public function addItem($name, $title, $options = [])
    {
        $options = is_string($options) ? ['url' => $options] : $options;
        $item    = new Item($this, $name, $title, $options);
        $this->items->addItem($item);

        return $item;
    }
public function addItem($name, $title, $options = [])
    {
        $options = is_string($options) ? ['url' => $options] : $options;
        $item    = new Item($this, $name, $title, $options);
        $this->items->addItem($item);

        return $item;
    }
public function addItem ( $ name , $ title , $ options = [ ] ) { $ options = is_string ( $ options ) ? [ 'url' => $ options ] : $ options ; $ item = new Item ( $ this , $ name , $ title , $ options ) ; $ this -> items -> addItem ( $ item ) ; return $ item ; }
Adds an item to the menu

@param string       $name
@param string       $title
@param string|array $options

@return Item
Adds an item to the menu