프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$menu | ElggMenuItem[] | ||
$selected |
메소드 | 설명 | |
---|---|---|
__construct ( array $menu ) | \ElggMenuBuilder constructor | |
compareByName ( ElggMenuItem $a, ElggMenuItem $b ) : boolean | Compare two menu items by their identifiers | |
compareByPriority ( ElggMenuItem $a, ElggMenuItem $b ) : boolean | Compare two menu items by their priority | |
compareByText ( ElggMenuItem $a, ElggMenuItem $b ) : boolean | Compare two menu items by their display text HTML tags are stripped before comparison | |
getMenu ( mixed $sort_by = 'text' ) : array | Get a prepared menu array | |
getSelected ( ) : ElggMenuItem | Get the selected menu item |
메소드 | 설명 | |
---|---|---|
findSelected ( ) : ElggMenuItem | Find the menu item that is currently selected | |
selectFromContext ( ) : void | Select menu items for the current context | |
setupSections ( ) : void | Group the menu items into sections | |
setupTrees ( ) : void | Create trees for each menu section | |
sort ( mixed $sort_by ) : void | Sort the menu sections and trees |
public __construct ( array $menu ) | ||
$menu | array | Array of \ElggMenuItem objects |
public static compareByName ( ElggMenuItem $a, ElggMenuItem $b ) : boolean | ||
$a | ElggMenuItem | Menu item |
$b | ElggMenuItem | Menu item |
리턴 | boolean |
public static compareByPriority ( ElggMenuItem $a, ElggMenuItem $b ) : boolean | ||
$a | ElggMenuItem | Menu item |
$b | ElggMenuItem | Menu item |
리턴 | boolean |
public static compareByText ( ElggMenuItem $a, ElggMenuItem $b ) : boolean | ||
$a | ElggMenuItem | Menu item |
$b | ElggMenuItem | Menu item |
리턴 | boolean |
protected findSelected ( ) : ElggMenuItem | ||
리턴 | ElggMenuItem |
public getSelected ( ) : ElggMenuItem | ||
리턴 | ElggMenuItem |
protected selectFromContext ( ) : void | ||
리턴 | void |
protected setupSections ( ) : void | ||
리턴 | void |