| 1 | <?php namespace Anomaly\DashboardModule\Dashboard; |
||
| 17 | class DashboardModel extends DashboardDashboardsEntryModel implements DashboardInterface |
||
| 18 | { |
||
| 19 | |||
| 20 | /** |
||
| 21 | * The active flag. |
||
| 22 | * |
||
| 23 | * @var bool |
||
| 24 | */ |
||
| 25 | protected $active = false; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Eager loaded relations. |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $with = [ |
||
| 33 | 'translations' |
||
| 34 | ]; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get the active flag. |
||
| 38 | * |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | public function isActive() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Set the active flag. |
||
| 48 | * |
||
| 49 | * @param $active |
||
| 50 | * @return $this |
||
| 51 | */ |
||
| 52 | public function setActive($active) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the slug. |
||
| 61 | * |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getSlug() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Get the name. |
||
| 71 | * |
||
| 72 | * @return string |
||
| 73 | */ |
||
| 74 | public function getName() |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Get the allowed roles. |
||
| 81 | * |
||
| 82 | * @return RoleCollection |
||
| 83 | */ |
||
| 84 | public function getAllowedRoles() |
||
| 88 | |||
| 89 | /** |
||
| 90 | * Get the related widgets. |
||
| 91 | * |
||
| 92 | * @return \Anomaly\Streams\Platform\Entry\EntryPresenter|mixed |
||
| 93 | */ |
||
| 94 | public function getWidgets() |
||
| 98 | |||
| 99 | /** |
||
| 100 | * Return the widget relation. |
||
| 101 | * |
||
| 102 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 103 | */ |
||
| 104 | public function widgets() |
||
| 108 | } |
||
| 109 |