mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 22:04:25 +02:00
parent
298c4ad38b
commit
1393db687b
@ -14,13 +14,11 @@ use Icinga\Web\Url;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A navigation item
|
* A navigation item
|
||||||
*
|
|
||||||
* @see \Icinga\Web\Navigation\Navigation For a usage example.
|
|
||||||
*/
|
*/
|
||||||
class NavigationItem implements Countable, IteratorAggregate
|
class NavigationItem implements Countable, IteratorAggregate
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Alternative markup element if the navigation item has no URL
|
* Alternative markup element for items without a url
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
@ -48,9 +46,9 @@ class NavigationItem implements Countable, IteratorAggregate
|
|||||||
protected $children;
|
protected $children;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Icon
|
* This item's icon
|
||||||
*
|
*
|
||||||
* @var string|null
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $icon;
|
protected $icon;
|
||||||
|
|
||||||
@ -254,7 +252,7 @@ class NavigationItem implements Countable, IteratorAggregate
|
|||||||
*/
|
*/
|
||||||
public function hasChildren()
|
public function hasChildren()
|
||||||
{
|
{
|
||||||
return ! $this->getChildren()->isEmpty();
|
return !$this->getChildren()->isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -281,9 +279,9 @@ class NavigationItem implements Countable, IteratorAggregate
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the icon
|
* Return this item's icon
|
||||||
*
|
*
|
||||||
* @return string|null
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getIcon()
|
public function getIcon()
|
||||||
{
|
{
|
||||||
@ -291,7 +289,7 @@ class NavigationItem implements Countable, IteratorAggregate
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the icon
|
* Set this item's icon
|
||||||
*
|
*
|
||||||
* @param string $icon
|
* @param string $icon
|
||||||
*
|
*
|
||||||
@ -299,7 +297,7 @@ class NavigationItem implements Countable, IteratorAggregate
|
|||||||
*/
|
*/
|
||||||
public function setIcon($icon)
|
public function setIcon($icon)
|
||||||
{
|
{
|
||||||
$this->icon = (string) $icon;
|
$this->icon = $icon;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user