Xpressengine\Menu\MenuHandler::getAll PHP Method

getAll() public method

Get all menu
public getAll ( string $siteKey, array $with = [] ) : Menu[]
$siteKey string site key
$with array relation
return Xpressengine\Menu\Models\Menu[]
    public function getAll($siteKey, $with = [])
    {
        return $this->repo->all($siteKey, $with);
    }

Usage Example

 public function editSetting(SiteHandler $siteHandler, MenuHandler $menuHandler)
 {
     $config = app('xe.site')->getSiteConfig();
     $siteKey = $siteHandler->getCurrentSiteKey();
     $indexInstance = $siteHandler->getHomeInstanceId();
     $menus = $menuHandler->getAll($siteKey, 'items');
     return \XePresenter::make('settings.setting', compact('config', 'menus', 'indexInstance'));
 }
All Usage Examples Of Xpressengine\Menu\MenuHandler::getAll