src/MocaBonita.php
public function addMbPage(MbPage $mbPage)
    {
        $mbPage->setSubMenu(false);

        $mbPage->setMainMenu(true);

        $this->mbPages->put($mbPage->getSlug(), $mbPage);

        foreach ($mbPage->getSubPages() as $subPage) {
            $this->addSubMbPage($subPage);
            $subPage->setParentPage($mbPage);
        }

        return $this;
    }
public function addMbPage(MbPage $mbPage)
    {
        $mbPage->setSubMenu(false);

        $mbPage->setMainMenu(true);

        $this->mbPages->put($mbPage->getSlug(), $mbPage);

        foreach ($mbPage->getSubPages() as $subPage) {
            $this->addSubMbPage($subPage);
            $subPage->setParentPage($mbPage);
        }

        return $this;
    }
public function addMbPage ( MbPage $ mbPage ) { $ mbPage -> setSubMenu ( false ) ; $ mbPage -> setMainMenu ( true ) ; $ this -> mbPages -> put ( $ mbPage -> getSlug ( ) , $ mbPage ) ; foreach ( $ mbPage -> getSubPages ( ) as $ subPage ) { $ this -> addSubMbPage ( $ subPage ) ; $ subPage -> setParentPage ( $ mbPage ) ; } return $ this ; }
Add a MbPage to MocaBonita as main menu

@param MbPage $mbPage

@return MocaBonita current instance of MocaBonita
Add a MbPage to MocaBonita as main menu