function entityreference_field_info in Entity reference 8
Same name and namespace in other branches
- 7 entityreference.module \entityreference_field_info()
Implements hook_field_info().
File
- ./
entityreference.module, line 17 - Provides a field that can reference other entities.
Code
function entityreference_field_info() {
$field_info['entityreference'] = array(
'label' => t('Entity Reference'),
'description' => t('This field reference another entity.'),
'settings' => array(
// Default to the core target entity type node.
'target_type' => 'node',
// The handler for this field.
'handler' => 'base',
// The handler settings.
'handler_settings' => array(),
),
'instance_settings' => array(),
'default_widget' => 'options_list',
'default_formatter' => 'entityreference_label',
);
return $field_info;
}