PHP Класс Carbon_Fields\Container\Nav_Menu_Container

Наследование: extends Container
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$active_containers
$initialized
$instances

Открытые методы

Метод Описание
__construct ( string $id ) Create a new nav menu item fields container
edit_walker ( ) Setup custom walker for the Nav Menu entries
form ( $item ) Render custom fields inside each Nav Menu entry
get_containers ( ) Get containers only once, and store in instance memory.
init ( integer $menu_id, boolean $render = true ) Perform instance initialization after calling setup()
initialize_filters ( ) Initialize filters. This will be executed only once
is_valid_attach ( ) TODO: make sure the containers for nav menus are not printed everywhere
is_valid_save ( ) : boolean Checks whether the current request is valid
render ( ) Output the container markup
save ( $user_data = null ) Perform save operation after successful is_valid_save() check.
set_instance_for_id ( $current_menu_item_id, $render = true ) Render attribute prevents field containers showing on menu save
set_menu_id ( integer $menu_id ) Set the menu item ID the container will operate with.
to_json ( boolean $load ) : array Returns an array that holds the container data, suitable for JSON representation.
update ( $menu_id, $current_menu_item_id ) Trigger Save for all instances

Описание методов

__construct() публичный метод

Create a new nav menu item fields container
public __construct ( string $id )
$id string ID of the container

edit_walker() публичный статический метод

Setup custom walker for the Nav Menu entries
public static edit_walker ( )

form() публичный статический метод

Render custom fields inside each Nav Menu entry
public static form ( $item )

get_containers() публичный статический метод

Get containers only once, and store in instance memory.
public static get_containers ( )

init() публичный метод

Perform instance initialization after calling setup()
public init ( integer $menu_id, boolean $render = true )
$menu_id integer Used to pass the correct menu_item_id to the Container object
$render boolean Whether the container will render the fields.

initialize_filters() публичный статический метод

Initialize filters. This will be executed only once
public static initialize_filters ( )

is_valid_attach() публичный метод

TODO: make sure the containers for nav menus are not printed everywhere
public is_valid_attach ( )

is_valid_save() публичный метод

Checks whether the current request is valid
public is_valid_save ( ) : boolean
Результат boolean

render() публичный метод

Output the container markup
public render ( )

save() публичный метод

The call is propagated to all fields in the container.
public save ( $user_data = null )

set_instance_for_id() публичный статический метод

Render attribute prevents field containers showing on menu save
public static set_instance_for_id ( $current_menu_item_id, $render = true )

set_menu_id() публичный метод

Set the menu item ID the container will operate with.
public set_menu_id ( integer $menu_id )
$menu_id integer

to_json() публичный метод

This data will be available in the Underscore template and the Backbone Model.
public to_json ( boolean $load ) : array
$load boolean Should the value be loaded from the database or use the value from the current instance.
Результат array

update() публичный статический метод

Trigger Save for all instances
public static update ( $menu_id, $current_menu_item_id )

Описание свойств

$active_containers публичное статическое свойство

public static $active_containers

$initialized публичное статическое свойство

public static $initialized

$instances публичное статическое свойство

public static $instances