You are here

function _crm_core_relationship_field_status_instance in CRM Core 8.2

Same name and namespace in other branches
  1. 8.3 modules/crm_core_relationship/crm_core_relationship.fields.inc \_crm_core_relationship_field_status_instance()
  2. 8 modules/crm_core_relationship/crm_core_relationship.fields.inc \_crm_core_relationship_field_status_instance()
  3. 7 modules/crm_core_relationship/crm_core_relationship.fields.inc \_crm_core_relationship_field_status_instance()

Parameters

$type string: Bundle type.

Return value

array Array of field instances config.

1 call to _crm_core_relationship_field_status_instance()
crm_core_relationship_field_attach_create_bundle in modules/crm_core_relationship/crm_core_relationship.module
Implements hook_field_attach_create_bundle.

File

modules/crm_core_relationship/crm_core_relationship.fields.inc, line 45

Code

function _crm_core_relationship_field_status_instance($type) {
  $fields = array();
  $fields[] = array(
    'bundle' => $type,
    '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' => 'relation',
    'field_name' => 'crm_core_relationship_status',
    'label' => t('Status'),
    'required' => 0,
    'settings' => array(
      'user_register_form' => FALSE,
    ),
    'widget' => array(
      'active' => 1,
      'module' => 'options',
      'settings' => array(
        'display_label' => 0,
      ),
      'type' => 'options_onoff',
      'weight' => '1',
    ),
  );
  return $fields;
}