You are here

function og_vocab_og_fields_info in OG Vocabulary 7

Implements hook_og_fields_info().

File

./og_vocab.module, line 332
Give each group its own system controlled vocabularies.

Code

function og_vocab_og_fields_info() {
  $items[OG_VOCAB_FIELD] = array(
    'type' => array(
      'group content',
    ),
    'description' => t('Complex widget to reference taxonomy terms related to accessible groups.'),
    // Allow multiple OG-vocab fields on the same bundle.
    'multiple' => TRUE,
    'field' => array(
      'settings' => array(
        'handler' => 'base',
        'target_type' => 'taxonomy_term',
        'handler_settings' => array(
          'target_bundles' => array(),
          'behaviors' => array(
            'og_vocab' => array(
              'status' => TRUE,
            ),
            'taxonomy-index' => array(
              'status' => TRUE,
            ),
          ),
        ),
      ),
      'field_name' => OG_VOCAB_FIELD,
      'type' => 'entityreference',
      'cardinality' => FIELD_CARDINALITY_UNLIMITED,
    ),
    'instance' => array(
      'label' => t('OG vocabulary'),
      'widget' => array(
        'module' => 'og_vocab',
        'settings' => array(),
        'type' => 'og_vocab_complex',
      ),
      'display' => array(
        'default' => array(
          'type' => 'og_vocab',
        ),
      ),
    ),
  );
  return $items;
}