PHP Class Carbon_Fields\Field\Html_Field

Allows to create a field that displays any HTML in a container.
Inheritance: extends Field
Show file Open project: htmlburger/carbon-fields

Public Properties

Property Type Description
$field_html

Public Methods

Method Description
delete ( ) Delete the field value.
get_label ( ) : string Retrieve field label.
is_required ( ) : false Whether this field is required.
load ( ) Load the field value.
save ( ) Save the field value.
set_html ( string | callable $callback_or_html ) Set the field HTML or callback that returns the HTML.
template ( ) Underscore template of this field
to_json ( boolean $load ) : array Returns an array that holds the field data, suitable for JSON representation.

Method Details

delete() public method

Skipped, no value to be deleted.
public delete ( )

get_label() public method

The label for the HTML field is hidden by design.
public get_label ( ) : string
return string

is_required() public method

The HTML field is non-required by design.
public is_required ( ) : false
return false

load() public method

Skipped, no value to be loaded.
public load ( )

save() public method

Skipped, no value to be saved.
public save ( )

set_html() public method

Set the field HTML or callback that returns the HTML.
public set_html ( string | callable $callback_or_html )
$callback_or_html string | callable HTML or callable that returns the HTML.

template() public method

Underscore template of this field
public template ( )

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

Property Details

$field_html public property

public $field_html