PHP Class Carbon_Fields\Container\Widget_Container

Inheritance: extends Container
Datei anzeigen Open project: htmlburger/carbon-fields

Public Methods

Method Description
__construct ( string $id ) Create a new widget
init ( ) Perform instance initialization after calling setup()
is_valid_attach ( ) : boolean Perform checks whether the container should be attached during the current request
render ( ) Output the container markup
to_json ( boolean $load ) : array Returns an array that holds the container data, suitable for JSON representation.

Method Details

__construct() public method

Create a new widget
public __construct ( string $id )
$id string Unique ID of the widget

init() public method

Perform instance initialization after calling setup()
public init ( )

is_valid_attach() public method

Perform checks whether the container should be attached during the current request
public is_valid_attach ( ) : boolean
return boolean True if the container is allowed to be attached

render() public method

Output the container markup
public render ( )

to_json() public method

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.
return array