PHP 클래스 Timber\Menu

상속: extends Core
파일 보기 프로젝트 열기: jarednova/timber

공개 프로퍼티들

프로퍼티 타입 설명
$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

공개 메소드들

메소드 설명
__construct ( integer | string $slug )
find_parent_item_in_menu ( array $menu_items, integer $parent_id ) : TimberMenuItem | null
get_items ( ) : array

보호된 메소드들

메소드 설명
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

메소드 상세

__construct() 공개 메소드

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

find_parent_item_in_menu() 공개 메소드

public find_parent_item_in_menu ( array $menu_items, integer $parent_id ) : TimberMenuItem | null
$menu_items array
$parent_id integer
리턴 TimberMenuItem | null

get_items() 공개 메소드

public get_items ( ) : array
리턴 array

get_menu_id_from_locations() 보호된 메소드

protected get_menu_id_from_locations ( string $slug, array $locations ) : integer
$slug string
$locations array
리턴 integer

get_menu_id_from_terms() 보호된 메소드

protected get_menu_id_from_terms ( integer $slug ) : integer
$slug integer
리턴 integer

init() 보호된 메소드

protected init ( integer $menu_id )
$menu_id integer

init_as_page_menu() 보호된 메소드

protected init_as_page_menu ( )

order_children() 보호된 메소드

protected order_children ( array $items ) : array
$items array
리턴 array

프로퍼티 상세

$ID 공개적으로 프로퍼티

public $ID

$MenuItemClass 공개적으로 프로퍼티

public $MenuItemClass

$PostClass 공개적으로 프로퍼티

public $PostClass

$id 공개적으로 프로퍼티

the ID# of the menu, corresponding to the wp_terms table
public int $id
리턴 integer

$items 공개적으로 프로퍼티

you need to iterate through
public TimberMenuItem[]|null $items
리턴 TimberMenuItem[] | null

$name 공개적으로 프로퍼티

of the menu (ex: Main Navigation)
public string $name
리턴 string

$term_id 공개적으로 프로퍼티

public int $term_id
리턴 integer

$title 공개적으로 프로퍼티

public string $title
리턴 string