You are here

function synonyms_field_widget_info in Synonyms 7

Implements hook_field_widget_info().

File

./synonyms.module, line 186
Provide synonyms feature for Drupal entities.

Code

function synonyms_field_widget_info() {
  return array(
    'synonyms_autocomplete_taxonomy_term' => array(
      'label' => t('Synonyms friendly autocomplete'),
      'field types' => array(
        'taxonomy_term_reference',
      ),
      'settings' => array(
        'size' => 60,
        'synonyms_autocomplete_path' => 'synonyms/autocomplete-taxonomy-term',
        'suggestion_size' => 10,
        'suggest_only_unique' => FALSE,
        'auto_creation' => 1,
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
    ),
    'synonyms_autocomplete_entity' => array(
      'label' => t('Synonyms friendly autocomplete'),
      'field types' => array(
        'entityreference',
      ),
      'settings' => array(
        'size' => 60,
        'synonyms_autocomplete_path' => 'synonyms/autocomplete-entity',
        'suggestion_size' => 10,
        'suggest_only_unique' => FALSE,
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
    ),
    'synonyms_select_taxonomy_term' => array(
      'label' => t('Synonyms friendly select list'),
      'field types' => array(
        'taxonomy_term_reference',
      ),
      'settings' => array(
        'sort' => 'weight',
      ),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
    ),
    'synonyms_select_entity' => array(
      'label' => t('Synonyms friendly select list'),
      'field types' => array(
        'entityreference',
      ),
      'settings' => array(),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_CUSTOM,
      ),
    ),
  );
}