src/Nav.php
public static function getMenu($alias, $ordered = false)
    {
        if (!isset(self::$_menus[$alias])) {
            throw new Exception(__d('wasabi_core', 'No menu with alias "{0}" does exist.', $alias));
        }
        if (!$ordered) {
            return self::$_menus[$alias];
        }

        return self::$_menus[$alias]->getOrderedArray();
    }
public static function getMenu($alias, $ordered = false)
    {
        if (!isset(self::$_menus[$alias])) {
            throw new Exception(__d('wasabi_core', 'No menu with alias "{0}" does exist.', $alias));
        }
        if (!$ordered) {
            return self::$_menus[$alias];
        }

        return self::$_menus[$alias]->getOrderedArray();
    }
public static function getMenu ( $ alias , $ ordered = false ) { if ( ! isset ( self :: $ _menus [ $ alias ] ) ) { throw new Exception ( __d ( 'wasabi_core' , 'No menu with alias "{0}" does exist.' , $ alias ) ) ; } if ( ! $ ordered ) { return self :: $ _menus [ $ alias ] ; } return self :: $ _menus [ $ alias ] -> getOrderedArray ( ) ; }
Get a Menu instance or an ordered array
of menu items of a menu.

@param string $alias the alias of the menu
@param bool $ordered true: return array of priority ordered menu items, false: return WasabiMenu instance
@throws Exception
@return array|Menu
Get a Menu instance or an ordered array of menu items of a menu .