function entity_background_add_field_eb_selection in Entity background 7
Creates eb_selection field instance.
Parameters
type $entity_type: An entity type for the instance.
$bundle: A bundle for the instance.
$field_label: A field label.
Return value
array An instance information array.
1 call to entity_background_add_field_eb_selection()
- entity_background_form_paragraphs_admin_bundle_submit in ./
entity_background.module - Custom submit handler for entity_background fieldset.
File
- includes/
entity_background.fields_crud.inc, line 73 - Fields CRUD functions.
Code
function entity_background_add_field_eb_selection($entity_type, $bundle, $field_label) {
$field = entity_background_get_field_eb_selection();
$instance = _entity_background_add_field($entity_type, array(
'bundle' => $bundle,
'entity_type' => $entity_type,
'field_name' => $field['field_name'],
'label' => $field_label,
'display' => array(
'default' => array(
'type' => 'hidden',
),
),
'widget' => array(
'type' => 'options_select',
'weight' => -50,
),
));
return $instance;
}