PHP Class Timber\Menu

Inheritance: extends Core
Afficher le fichier Open project: jarednova/timber

Méthodes publiques

Свойство Type Description
$ID
$MenuItemClass
$PostClass
$id integer the ID# of the menu, corresponding to the wp_terms table
$items TimberMenuItem[] | null you need to iterate through
$name string of the menu (ex: Main Navigation)
$term_id integer
$title string

Méthodes publiques

Méthode Description
__construct ( integer | string $slug )
find_parent_item_in_menu ( array $menu_items, integer $parent_id ) : TimberMenuItem | null
get_items ( ) : array

Méthodes protégées

Méthode Description
get_menu_id_from_locations ( string $slug, array $locations ) : integer
get_menu_id_from_terms ( integer $slug ) : integer
init ( integer $menu_id )
init_as_page_menu ( )
order_children ( array $items ) : array

Method Details

__construct() public méthode

public __construct ( integer | string $slug )
$slug integer | string

find_parent_item_in_menu() public méthode

public find_parent_item_in_menu ( array $menu_items, integer $parent_id ) : TimberMenuItem | null
$menu_items array
$parent_id integer
Résultat TimberMenuItem | null

get_items() public méthode

public get_items ( ) : array
Résultat array

get_menu_id_from_locations() protected méthode

protected get_menu_id_from_locations ( string $slug, array $locations ) : integer
$slug string
$locations array
Résultat integer

get_menu_id_from_terms() protected méthode

protected get_menu_id_from_terms ( integer $slug ) : integer
$slug integer
Résultat integer

init() protected méthode

protected init ( integer $menu_id )
$menu_id integer

init_as_page_menu() protected méthode

protected init_as_page_menu ( )

order_children() protected méthode

protected order_children ( array $items ) : array
$items array
Résultat array

Property Details

$ID public_oe property

public $ID

$MenuItemClass public_oe property

public $MenuItemClass

$PostClass public_oe property

public $PostClass

$id public_oe property

the ID# of the menu, corresponding to the wp_terms table
public int $id
Résultat integer

$items public_oe property

you need to iterate through
public TimberMenuItem[]|null $items
Résultat TimberMenuItem[] | null

$name public_oe property

of the menu (ex: Main Navigation)
public string $name
Résultat string

$term_id public_oe property

public int $term_id
Résultat integer

$title public_oe property

public string $title
Résultat string