Xpressengine\Menu\MenuRepository::all PHP Method

all() public method

Get all menu
public all ( string $siteKey, array $with = [] ) : Menu[]
$siteKey string site key
$with array relation
return Xpressengine\Menu\Models\Menu[]
    public function all($siteKey, $with = []);

Usage Example

示例#1
0
 /**
  * Get all menu
  *
  * @param string $siteKey site key
  * @param array  $with    relation
  * @return Menu[]
  */
 public function all($siteKey, $with = [])
 {
     $menus = $this->repo->all($siteKey, $with);
     foreach ($menus as $menu) {
         $this->bag[$menu->getKey()] = $menu;
     }
     return $menus;
 }
All Usage Examples Of Xpressengine\Menu\MenuRepository::all