field_type = $type; return $this; } /** * Change the value type of the field. * * @param string $value_type * @return File_Field */ public function set_value_type( $value_type ) { $this->value_type = $value_type; return $this; } /** * Returns an array that holds the field data, suitable for JSON representation. * * @access public * * @param bool $load 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( 'type_filter' => $this->field_type, 'value_type' => $this->value_type, ) ); return $field_data; } }