You are here

function entity_property_field_item_file_info in Entity API 7

Defines info for the properties of the file-field item data structure.

1 call to entity_property_field_item_file_info()
entity_metadata_field_file_callback in modules/field.info.inc
Additional callback to adapt the property info for file fields.

File

includes/entity.property.inc, line 550
Provides API functions around hook_entity_property_info(). Also see entity.info.inc, which cares for providing entity property info for all core entity types.

Code

function entity_property_field_item_file_info() {
  $properties['file'] = array(
    'type' => 'file',
    'label' => t('The file.'),
    'getter callback' => 'entity_metadata_field_file_get',
    'setter callback' => 'entity_metadata_field_file_set',
    'required' => TRUE,
  );
  $properties['description'] = array(
    'type' => 'text',
    'label' => t('The file description'),
    'setter callback' => 'entity_property_verbatim_set',
  );
  $properties['display'] = array(
    'type' => 'boolean',
    'label' => t('Whether the file is being displayed.'),
    'setter callback' => 'entity_property_verbatim_set',
  );
  return $properties;
}