function commons_groups_field_definition in Drupal Commons 7.3
1 call to commons_groups_field_definition()
- commons_groups_field_default_field_instances in modules/
commons/ commons_groups/ commons_groups.features.field_instance.inc - Implements hook_field_default_field_instances().
File
- modules/
commons/ commons_groups/ commons_groups.features.field_instance.inc, line 418 - commons_groups.features.field_instance.inc
Code
function commons_groups_field_definition(&$field_instances, $entity_type, $bundle) {
// Exported field_instance: 'node-post-og_group_ref'
$field_instances["{$entity_type}-{$bundle}-og_group_ref"] = array(
'bundle' => $bundle,
'default_value' => NULL,
'default_value_function' => 'commons_groups_entityreference_default_value',
'deleted' => '0',
'description' => 'Separate group names with commas',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'og_ui',
'settings' => array(),
'type' => 'og_list_default',
'weight' => 11,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => $entity_type,
'field_name' => 'og_group_ref',
'label' => 'Groups',
'required' => 0,
'settings' => array(
'behaviors' => array(
'og_widget' => array(
'admin' => array(
'widget_type' => 'entityreference_autocomplete_tags',
),
'default' => array(
'widget_type' => 'entityreference_autocomplete_tags',
),
'status' => TRUE,
),
'prepopulate' => array(
'action' => 'none',
'fallback' => 'none',
'og_context' => 0,
'skip_perm' => '0',
'status' => 1,
),
),
'user_register_form' => FALSE,
),
'view modes' => array(
'full' => array(
'custom settings' => FALSE,
'label' => 'Full',
'type' => 'og_list_default',
),
'teaser' => array(
'custom settings' => FALSE,
'label' => 'Teaser',
'type' => 'og_list_default',
),
),
'widget' => array(
'active' => 0,
'module' => 'og',
'settings' => array(),
'type' => 'og_complex',
'weight' => 5,
),
);
// Exported field_instance: '[entity]-[bundle]-group_content_access'
$field_instances["{$entity_type}-{$bundle}-group_content_access"] = array(
'bundle' => $bundle,
'default_value' => array(
0 => array(
'value' => 0,
),
),
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 5,
),
'teaser' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => $entity_type,
'field_name' => 'group_content_access',
'label' => 'Group content visibility',
'required' => TRUE,
'settings' => array(
'user_register_form' => FALSE,
),
'view modes' => array(
'full' => array(
'label' => 'above',
'type' => 'list_default',
),
'teaser' => array(
'label' => 'above',
'type' => 'list_default',
),
),
'widget' => array(
'module' => 'options',
'settings' => array(),
'type' => 'options_select',
'weight' => 16,
),
'widget_type' => 'options_select',
);
}