Carbon_Fields\Field\Time_Field::to_json PHP Method

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
    public function to_json($load)
    {
        $field_data = parent::to_json($load);
        $field_data = array_merge($field_data, array('timepicker_type' => $this->timepicker_type, 'time_format' => $this->get_time_format(), 'interval_step' => $this->get_interval_step(), 'restraints' => $this->get_restraints(), 'timepicker_options' => $this->get_timepicker_options()));
        return $field_data;
    }