public function add($title, $options = '')
    {
        $id = isset($options['id']) ? $options['id'] : $this->id();

        $item = new Item($this, $id, $title, $options);

        $this->items->push($item);

        return $item;
    }
public function add($title, $options = '')
    {
        $id = isset($options['id']) ? $options['id'] : $this->id();

        $item = new Item($this, $id, $title, $options);

        $this->items->push($item);

        return $item;
    }
public function add ( $ title , $ options = '' ) { $ id = isset ( $ options [ 'id' ] ) ? $ options [ 'id' ] : $ this -> id ( ) ; $ item = new Item ( $ this , $ id , $ title , $ options ) ; $ this -> items -> push ( $ item ) ; return $ item ; }
Adds an item to the menu.

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

@return Item $item
Adds an item to the menu .