You are here

function og_theme_og_fields_info in Organic groups theme 7

Same name and namespace in other branches
  1. 7.2 og_theme.module \og_theme_og_fields_info()

Implement og_fields_info().

File

./og_theme.module, line 16
Associate theme to a group.

Code

function og_theme_og_fields_info() {
  $items[OG_THEME_FIELD] = array(
    'type' => array(
      'group',
    ),
    'description' => t('Associate theme to a group.'),
    'field' => array(
      'field_name' => OG_THEME_FIELD,
      'no_ui' => TRUE,
      'type' => 'list_text',
      'cardinality' => 1,
      'settings' => array(
        'allowed_values' => array(),
        'allowed_values_function' => 'og_theme_field_allowed_values',
      ),
    ),
    'instance' => array(
      'label' => t('Groups theme'),
      'widget_type' => 'options_select',
      'required' => TRUE,
      // Use default theme as default value.
      'default_value' => array(
        0 => array(
          'value' => '__default',
        ),
      ),
      'view modes' => array(
        'full' => array(
          'label' => 'above',
          'type' => 'list_default',
        ),
        'teaser' => array(
          'label' => 'above',
          'type' => 'list_default',
        ),
      ),
    ),
  );
  return $items;
}