public function addEntry(MenuEntry $entry)
    {
        if ($this->prepared) {
            throw new \RuntimeException('MenuGroup has been prepared and can\'t receive new entries.');
        }
        $this->entries[] = $entry;

        return $this;
    }
public function addEntry(MenuEntry $entry)
    {
        if ($this->prepared) {
            throw new \RuntimeException('MenuGroup has been prepared and can\'t receive new entries.');
        }
        $this->entries[] = $entry;

        return $this;
    }
public function addEntry ( MenuEntry $ entry ) { if ( $ this -> prepared ) { throw new \ RuntimeException ( 'MenuGroup has been prepared and can\'t receive new entries.' ) ; } $ this -> entries [ ] = $ entry ; return $ this ; }
Adds an entry.

@param MenuEntry $entry
@throws \RuntimeException
@return MenuGroup
Adds an entry .