src/Label305/Auja/Menu/Resource.php
public function addItem(MenuItem $item) {
        if($item instanceof ResourceMenuItem){
            throw new \InvalidArgumentException('ResourceMenuItem passed to Resource::addItem(MenuItem). You cannot nest ResourceMenuItems.');
        }

        $this->items[] = $item;

        return $this;
    }
public function addItem(MenuItem $item) {
        if($item instanceof ResourceMenuItem){
            throw new \InvalidArgumentException('ResourceMenuItem passed to Resource::addItem(MenuItem). You cannot nest ResourceMenuItems.');
        }

        $this->items[] = $item;

        return $this;
    }
public function addItem ( MenuItem $ item ) { if ( $ item instanceof ResourceMenuItem ) { throw new \ InvalidArgumentException ( 'ResourceMenuItem passed to Resource::addItem(MenuItem). You cannot nest ResourceMenuItems.' ) ; } $ this -> items [ ] = $ item ; return $ this ; }
Adds a `MenuItem`, which contains a database entry.

@param MenuItem $item The item to add. Must not be a `ResourceMenuItem`.
@return $this
Adds a MenuItem which contains a database entry .