You are here

function uuidreference_field_info in UUID reference field 7

Implementation of hook_field_info().

File

./uuidreference.module, line 52

Code

function uuidreference_field_info() {
  $field_info['uuidreference'] = array(
    'label' => t('UUID reference'),
    'description' => t('Reference another entity by its UUID.'),
    'settings' => array(
      'target_type' => ($entity_info = entity_get_info()) && isset($entity_info['node']) ? 'node' : key($entity_info),
      'target_bundles' => array(),
    ),
    'default_widget' => 'uuidreference_textfield',
    'default_formatter' => 'uuidreference_label',
  );
  return $field_info;
}