You are here

function _cer_field_instance_definitions in Corresponding Entity References 7.3

Contains the default field instance definitions for presets.

1 call to _cer_field_instance_definitions()
cer_install in ./cer.install
Implements hook_install().

File

./cer.install, line 191
Install file providing corresponding entity reference schema.

Code

function _cer_field_instance_definitions() {
  $field_instances = array();
  $field_instances[] = array(
    'bundle' => 'cer',
    'default_value' => array(
      0 => array(
        'value' => 1,
      ),
    ),
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'above',
        'module' => 'list',
        'settings' => array(),
        'type' => 'list_default',
        'weight' => 1,
      ),
    ),
    'entity_type' => 'cer',
    'field_name' => 'cer_bidirectional',
    'label' => 'Bidirectional',
    'required' => 0,
    'settings' => array(),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(
        'display_label' => 1,
      ),
      'type' => 'options_onoff',
      'weight' => 3,
    ),
  );
  $field_instances[] = array(
    'bundle' => 'cer',
    'default_value' => array(
      0 => array(
        'value' => 1,
      ),
    ),
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'above',
        'module' => 'list',
        'settings' => array(),
        'type' => 'list_default',
        'weight' => 0,
      ),
    ),
    'entity_type' => 'cer',
    'field_name' => 'cer_enabled',
    'label' => 'Enabled',
    'required' => 0,
    'settings' => array(),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(
        'display_label' => 1,
      ),
      'type' => 'options_onoff',
      'weight' => 2,
    ),
  );
  $field_instances[] = array(
    'bundle' => 'cer',
    'default_value' => array(
      0 => array(
        'value' => 0,
      ),
    ),
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'above',
        'module' => 'list',
        'settings' => array(),
        'type' => 'list_default',
        'weight' => 4,
      ),
    ),
    'entity_type' => 'cer',
    'field_name' => 'cer_weight',
    'label' => 'Weight',
    'required' => 1,
    'settings' => array(),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(),
      'type' => 'options_select',
      'weight' => 4,
    ),
  );
  $field_instances[] = array(
    'bundle' => 'cer',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => NULL,
        'settings' => array(),
        'type' => 'field_object_default',
        'weight' => 5,
      ),
    ),
    'entity_type' => 'cer',
    'field_name' => 'cer_left',
    'label' => 'Left Field',
    'required' => 1,
    'settings' => array(
      'function' => 'CerFieldChain::collectAll',
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(),
      'type' => 'options_select',
      'weight' => 0,
    ),
  );
  $field_instances[] = array(
    'bundle' => 'cer',
    'default_value' => NULL,
    'deleted' => 0,
    'description' => '',
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'module' => NULL,
        'settings' => array(),
        'type' => 'field_object_default',
        'weight' => 6,
      ),
    ),
    'entity_type' => 'cer',
    'field_name' => 'cer_right',
    'label' => 'Right Field',
    'required' => 1,
    'settings' => array(
      'function' => 'CerFieldChain::collectAll',
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(),
      'type' => 'options_select',
      'weight' => 1,
    ),
  );
  return $field_instances;
}