(menu) add Visibility property

This commit is contained in:
Ad Schellevis 2016-01-22 16:52:02 +01:00
parent 82546f3bc6
commit 38a8276d4b

View File

@ -78,6 +78,12 @@ class MenuItem
*/
private $isExternal = "N";
/**
* visibility level, all, hidden, ...
* @var string
*/
private $visibility = 'all';
/**
* parent node, used to mark active nodes
* @var null|MenuItem
@ -138,6 +144,15 @@ class MenuItem
$this->sortOrder = $value;
}
/**
* set visibility
* @param $value visibility level
*/
public function setVisibility($value)
{
$this->visibility = $value;
}
/**
* get sort order
* @return int
@ -219,6 +234,15 @@ class MenuItem
return $this->isExternal;
}
/**
* getter for visibility level
* @return string
*/
public function getVisibility()
{
return $this->visibility;
}
/**
* check if this item is selected
* @return bool is this item selected