Ejemplo n.º 1
0
 /**
  * Add new item.
  *
  * @param string $url
  * @param string $label
  * @param array $attributes
  *
  * @return MenuItem
  */
 public function addItem($url, $label, $attributes = [])
 {
     $item = new MenuItem($url, $label, $attributes);
     $item->setPrefix($this->_prefix);
     $this->_items[] = $item;
     return $item;
 }
 /**
  * Returns the children of the item.
  *
  * @return array|null
  */
 public function getChildren()
 {
     return $this->_item->getChildren()->toArray();
 }