| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxVps\Core\Models;
- use ModulesGarden\Servers\ProxmoxVps\Core\Helper\BuildUrl;
- /**
- * Description of Breadcrumb
- *
- * @author inbs
- */
- class Breadcrumb
- {
- protected $name;
- protected $controller;
- protected $action;
- protected $params = [];
- protected $icon;
-
- protected $url;
- public function __construct ($name, $controller, $action, $params = [], $icon = null, $isUrl = true)
- {
- $this->name = $name;
- $this->controller = $controller;
- $this->action = $action;
- $this->params = $params;
- $this->icon = $icon;
- $this->url = $isUrl ? BuildUrl::getUrl($this->controller, $this->action, $this->params) : null;
- }
-
- public function getName()
- {
- return $this->name;
- }
-
- public function isUrl()
- {
- return ($this->url ? true : false);
- }
-
- public function getUrl()
- {
- return $this->url;
- }
-
- public function isIcon()
- {
- return ($this->icon ? true : false);
- }
-
- public function getIcon()
- {
- return $this->icon;
- }
- }
|