2018-10-22 14:04:37 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models\Presenters;
|
|
|
|
|
2018-11-02 11:54:46 +01:00
|
|
|
use App\Utils\Traits\MakesHash;
|
|
|
|
use Hashids\Hashids;
|
2018-10-22 14:04:37 +02:00
|
|
|
use Laracasts\Presenter\Presenter;
|
|
|
|
use URL;
|
|
|
|
use Utils;
|
|
|
|
use stdClass;
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
* Class EntityPresenter
|
|
|
|
* @package App\Models\Presenters
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
class EntityPresenter extends Presenter
|
|
|
|
{
|
2018-11-02 11:54:46 +01:00
|
|
|
use MakesHash;
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
2018-11-02 11:54:46 +01:00
|
|
|
public function id()
|
|
|
|
{
|
|
|
|
return $this->encodePrimaryKey($this->entity->id);
|
|
|
|
}
|
2018-10-22 14:04:37 +02:00
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function url()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function path()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function editUrl()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
* @param bool $label
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function statusLabel($label = false)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function statusColor()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function link()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function titledName()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-01-27 00:22:57 +01:00
|
|
|
/**
|
|
|
|
* @param bool $subColors
|
|
|
|
*/
|
2018-10-22 14:04:37 +02:00
|
|
|
public function calendarEvent($subColors = false)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|