/** * to_json() * * You can use this method to modify the field properties that are added to the JSON object. * The JSON object is used by the Backbone Model and the Underscore template. * * @param bool $load Should the value be loaded from the database or use the value from the current instance. * @return array */ function to_json($load) { $field_data = parent::to_json($load); // do not delete $field_data = array_merge($field_data, array('example_property' => $this->example_property)); return $field_data; }
function to_json($load) { $field_data = parent::to_json($load); $field_data = array_merge($field_data, array('html' => $this->field_html)); return $field_data; }