function commons_groups_field_definition_group in Drupal Commons 7.3
1 call to commons_groups_field_definition_group()
- 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 82
- commons_groups.features.field_instance.inc
Code
function commons_groups_field_definition_group(&$field_instances, $entity_type, $bundle) {
$field_instances["{$entity_type}-{$bundle}-field_og_subscribe_settings"] = array(
'bundle' => $bundle,
'default_value' => array(
0 => array(
'value' => 'anyone',
),
),
'deleted' => '0',
'description' => t("These privacy settings will not change the visibility of content that has already posted into this group. It takes effect only for content created after the group is saved with new privacy settings."),
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 4,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_og_subscribe_settings',
'label' => 'Privacy settings',
'required' => 1,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_buttons',
'weight' => '41',
),
);
$field_instances["{$entity_type}-{$bundle}-field_og_access_default_value"] = 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' => 'node',
'field_name' => 'field_og_access_default_value',
'label' => 'Hide contributed content from non-members',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(
'display_label' => 1,
),
'type' => 'options_onoff',
'weight' => '42',
),
);
$field_instances["{$entity_type}-{$bundle}-og_roles_permissions"] = array(
'bundle' => $bundle,
'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,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'og_roles_permissions',
'label' => 'Group roles and permissions',
'required' => TRUE,
'settings' => array(
'user_register_form' => FALSE,
),
'view modes' => array(
'full' => array(
'custom settings' => FALSE,
'label' => 'Full',
'type' => 'list_default',
),
'teaser' => array(
'custom settings' => FALSE,
'label' => 'Teaser',
'type' => 'list_default',
),
),
'widget' => array(
'module' => 'options',
'settings' => array(),
'type' => 'options_select',
'weight' => 1,
),
);
$field_instances["{$entity_type}-{$bundle}-body"] = array(
'bundle' => $bundle,
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 1,
),
'teaser' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'body',
'label' => 'Description',
'required' => 0,
'settings' => array(
'display_summary' => 0,
'text_processing' => '1',
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'text',
'settings' => array(
'rows' => '20',
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => '4',
),
);
$field_instances["{$entity_type}-{$bundle}-" . OG_GROUP_FIELD] = array(
'bundle' => $bundle,
'default_value' => array(
0 => array(
'value' => 1,
),
),
'deleted' => '0',
'description' => 'Determine if this is an OG group.',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'commons_groups',
'settings' => array(
'field_name' => '0',
),
'type' => 'commons_groups_group_subscribe',
'weight' => '0',
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'display_label' => 1,
'entity_type' => 'node',
'field_name' => OG_GROUP_FIELD,
'label' => 'Group',
'required' => FALSE,
'settings' => array(
'user_register_form' => FALSE,
),
'view modes' => array(
'full' => array(
'custom settings' => FALSE,
'label' => 'Full',
'type' => 'og_group_subscribe',
),
'teaser' => array(
'custom settings' => FALSE,
'label' => 'Teaser',
'type' => 'og_group_subscribe',
),
),
'widget' => array(
'module' => 'options',
'settings' => array(
'display_label' => 0,
'og_hide' => TRUE,
),
'type' => 'options_onoff',
'weight' => 0,
),
);
$field_instances["{$entity_type}-{$bundle}-group_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' => 4,
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'group_access',
'label' => 'Group visibility',
'required' => TRUE,
'settings' => array(
'user_register_form' => FALSE,
),
'view modes' => array(
'full' => array(
'label' => 'above',
'type' => 'options_onoff',
),
'teaser' => array(
'label' => 'above',
'type' => 'options_onoff',
),
),
'widget' => array(
'module' => 'options',
'settings' => array(),
'type' => 'options_buttons',
'weight' => 41,
),
'widget_type' => 'options_select',
);
$field_instances["{$entity_type}-{$bundle}-field_group_logo"] = array(
'bundle' => $bundle,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'image',
'settings' => array(
'image_link' => '',
'image_style' => '50x50',
),
'type' => 'image',
'weight' => '0',
),
'teaser' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'field_group_logo',
'label' => 'Group Logo',
'required' => 0,
'settings' => array(
'alt_field' => 0,
'default_image' => 0,
'file_directory' => '',
'file_extensions' => 'png gif jpg jpeg',
'max_filesize' => '20mb',
'max_resolution' => '',
'min_resolution' => '30x30',
'title_field' => 0,
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'image',
'settings' => array(
'preview_image_style' => 'thumbnail',
'progress_indicator' => 'throbber',
),
'type' => 'image_image',
'weight' => '5',
),
);
}