core/Field/Checkbox_Field.php 1 location
|
@@ 72-81 (lines=10) @@
|
| 69 |
|
* @param bool $load Should the value be loaded from the database or use the value from the current instance. |
| 70 |
|
* @return array |
| 71 |
|
*/ |
| 72 |
|
public function to_json( $load ) { |
| 73 |
|
$field_data = parent::to_json( $load ); |
| 74 |
|
|
| 75 |
|
$field_data = array_merge( $field_data, array( |
| 76 |
|
'option_value' => $this->get_option_value(), |
| 77 |
|
'option_label' => parent::get_label(), |
| 78 |
|
) ); |
| 79 |
|
|
| 80 |
|
return $field_data; |
| 81 |
|
} |
| 82 |
|
|
| 83 |
|
/** |
| 84 |
|
* Get the field label. |
core/Field/Date_Field.php 1 location
|
@@ 33-42 (lines=10) @@
|
| 30 |
|
* @param bool $load Should the value be loaded from the database or use the value from the current instance. |
| 31 |
|
* @return array |
| 32 |
|
*/ |
| 33 |
|
public function to_json( $load ) { |
| 34 |
|
$field_data = parent::to_json( $load ); |
| 35 |
|
|
| 36 |
|
$field_data = array_merge( $field_data, array( |
| 37 |
|
'storage_format' => $this->storage_format, |
| 38 |
|
'picker_options' => $this->picker_options, |
| 39 |
|
) ); |
| 40 |
|
|
| 41 |
|
return $field_data; |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
/** |
| 45 |
|
* Set datepicker options |
core/Field/Time_Field.php 1 location
|
@@ 35-44 (lines=10) @@
|
| 32 |
|
* @param bool $load Should the value be loaded from the database or use the value from the current instance. |
| 33 |
|
* @return array |
| 34 |
|
*/ |
| 35 |
|
public function to_json( $load ) { |
| 36 |
|
$field_data = parent::to_json( $load ); |
| 37 |
|
|
| 38 |
|
$field_data = array_merge( $field_data, array( |
| 39 |
|
'storage_format' => $this->storage_format, |
| 40 |
|
'picker_options' => $this->get_picker_options(), |
| 41 |
|
) ); |
| 42 |
|
|
| 43 |
|
return $field_data; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
/** |
| 47 |
|
* Sets other picker options. |