PHP Class Carbon_Fields\Field\File_Field

Allows selecting and saving a media attachment file, where the file ID is saved in the database.
Inheritance: extends Field
Show file Open project: htmlburger/carbon-fields

Public Properties

Property Type Description
$button_label
$field_type empty for all types. available types: audio, video, image
$value_type alt, author, caption, dateFormatted, description, editLink, filename, height, icon, id, link, menuOrder, mime, name, status, subtype, title, type, uploadedTo, url, width
$window_button_label
$window_label

Public Methods

Method Description
admin_init ( ) Admin initialization actions
set_type ( string $type ) Change the type of the field
set_value_type ( string $value_type ) Change the value type of the field.
template ( ) The main Underscore template of this field
template_description ( ) Underscore template of the file description section.
to_json ( boolean $load ) : array Returns an array that holds the field data, suitable for JSON representation.

Method Details

admin_init() public method

Admin initialization actions
public admin_init ( )

set_type() public method

Change the type of the field
public set_type ( string $type )
$type string

set_value_type() public method

Change the value type of the field.
public set_value_type ( string $value_type )
$value_type string

template() public method

The main Underscore template of this field
public template ( )

template_description() public method

Underscore template of the file description section.

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

$button_label public property

public $button_label

$field_type public property

empty for all types. available types: audio, video, image
public $field_type

$value_type public property

alt, author, caption, dateFormatted, description, editLink, filename, height, icon, id, link, menuOrder, mime, name, status, subtype, title, type, uploadedTo, url, width
public $value_type

$window_button_label public property

public $window_button_label

$window_label public property

public $window_label