You are here

function field_collection_field_info in Field collection 7

Implements hook_field_info().

File

./field_collection.module, line 424
Module implementing field collection field type.

Code

function field_collection_field_info() {
  return array(
    'field_collection' => array(
      'label' => t('Field collection'),
      'description' => t('This field stores references to embedded entities, which itself may contain any number of fields.'),
      'instance_settings' => array(),
      'default_widget' => 'field_collection_hidden',
      'default_formatter' => 'field_collection_view',
      // As of now there is no UI for setting the path.
      'settings' => array(
        'path' => '',
        'hide_blank_items' => TRUE,
        'hide_initial_item' => FALSE,
      ),
      // Add entity property info.
      'property_type' => 'field_collection_item',
      'property_callbacks' => array(
        'field_collection_entity_metadata_property_callback',
      ),
    ),
  );
}