You are here

function entity_metadata_field_file_create_item in Entity API 7

Callback for auto-creating file field $items.

1 string reference to 'entity_metadata_field_file_create_item'
entity_metadata_field_file_callback in modules/field.info.inc
Additional callback to adapt the property info for file fields.

File

modules/callbacks.inc, line 632
Provides various callbacks for the whole core module integration.

Code

function entity_metadata_field_file_create_item($property_name, $context) {

  // 'fid' is required, so 'file' has to be set as initial property.
  return array(
    'display' => isset($context['field']['settings']['display_default']) ? $context['field']['settings']['display_default'] : 0,
  );
}