PHP Class Carbon_Fields\Field\Time_Field

Inheritance: extends Field
Show file Open project: htmlburger/carbon-fields

Public Properties

Property Type Description
$interval_step array Interval step for hours, minutes and seconds.
$restraints array Restraints for hours, minutes, seconds and dates.
$time_format string Time format.
$timepicker_options array Timepicker options.

Protected Properties

Property Type Description
$timepicker_type string Timepicker type.

Public Methods

Method Description
admin_enqueue_scripts ( ) This method is called in the admin_enqueue_scripts action. It is called once per field type.
get_interval_step ( ) Returns the interval step.
get_restraints ( ) Returns the restraints.
get_time_format ( ) Returns the time format.
get_timepicker_options ( ) Returns the timepicker options.
set_interval_step ( $interval_steps ) Sets the interval step.
set_restraints ( $restraints ) Sets the restraints.
set_time_format ( $time_format ) Sets the time format.
set_timepicker_options ( $timepicker_options ) Sets other timepicker options.
template ( ) Prints the main Underscore template.
to_json ( boolean $load ) : array You can use this method to modify the field properties that are added to the JSON object.

Method Details

admin_enqueue_scripts() public static method

Enqueues field scripts and styles.
public static admin_enqueue_scripts ( )

get_interval_step() public method

Returns the interval step.
public get_interval_step ( )

get_restraints() public method

Returns the restraints.
public get_restraints ( )

get_time_format() public method

Returns the time format.
public get_time_format ( )

get_timepicker_options() public method

Returns the timepicker options.

set_interval_step() public method

Sets the interval step.
public set_interval_step ( $interval_steps )

set_restraints() public method

Sets the restraints.
public set_restraints ( $restraints )

set_time_format() public method

Sets the time format.
public set_time_format ( $time_format )

set_timepicker_options() public method

Sets other timepicker options.
public set_timepicker_options ( $timepicker_options )

template() public method

Prints the main Underscore template.
public template ( )

to_json() public method

The JSON object is used by the Backbone Model and the Underscore template.
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

$interval_step public property

Interval step for hours, minutes and seconds.
public array $interval_step
return array

$restraints public property

Restraints for hours, minutes, seconds and dates.
public array $restraints
return array

$time_format public property

Time format.
public string $time_format
return string

$timepicker_options public property

Timepicker options.
public array $timepicker_options
return array

$timepicker_type protected property

Timepicker type.
protected string $timepicker_type
return string