| | |
| | | protected string $icon = ''; |
| | | protected int $order = 0; |
| | | protected bool $isLink = false; |
| | | protected ?string $permission = null; |
| | | |
| | | public function __construct(string $title, ?string $slug = null, string $icon = '', ?string $parent = null) { |
| | | $this->title = $title; |
| | | $this->slug = is_null($slug) ? DashboardPage::sanitizeString($title) : DashboardPage::sanitizeString($slug); |
| | | $this->icon = $icon; |
| | | $this->parent = $parent; |
| | | $this->parent = is_null($parent) ? $parent : DashboardPage::sanitizeString($parent); |
| | | } |
| | | |
| | | public function getTitle():string |
| | |
| | | { |
| | | return $this->isLink; |
| | | } |
| | | |
| | | public function setPermission(string $permission):void |
| | | { |
| | | $this->permission = $permission; |
| | | } |
| | | public function getPermission():?string |
| | | { |
| | | return $this->permission; |
| | | } |
| | | } |