You are here

function range_property_field_item_range_info in Range 7

Defines info for the properties of the range field data structure.

1 call to range_property_field_item_range_info()
range_metadata_field_range_callback in ./range.module
Defines properties for range field.

File

./range.module, line 785
Defines range field types.

Code

function range_property_field_item_range_info($field) {
  $type = $field['type'] === 'range_integer' ? 'integer' : 'decimal';
  $properties['from'] = array(
    'type' => $type,
    'label' => t('From value'),
    'sanitized' => TRUE,
    'getter callback' => 'entity_property_verbatim_get',
    'setter callback' => 'entity_property_verbatim_set',
    'required' => TRUE,
  );
  $properties['to'] = array(
    'type' => $type,
    'label' => t('To value'),
    'sanitized' => TRUE,
    'getter callback' => 'entity_property_verbatim_get',
    'setter callback' => 'entity_property_verbatim_set',
    'required' => TRUE,
  );
  return $properties;
}