You are here

function user_badges_get_field_instances in User Badges 7.4

Return array of field_instances.

1 call to user_badges_get_field_instances()
user_badges_install in ./user_badges.install
Implements hook_install().

File

./user_badges.install, line 197
Install for user_badge module

Code

function user_badges_get_field_instances() {
  $fields = array();
  $fields['user_badge_image'] = array(
    'label' => t('User Badge Image'),
    'widget' => array(
      'weight' => 1,
      'type' => 'image_image',
      'module' => 'image',
      'active' => TRUE,
      'settings' => array(
        'progress_indicator' => 'throbber',
        'preview_image_style' => 'thumbnail',
      ),
    ),
    'settings' => array(
      'file_directory' => '',
      'file_extensions' => 'png gif jpg jpeg',
    ),
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'type' => 'image',
        'module' => 'image',
        'settings' => array(
          'image_style' => 'thumbnail',
          'image_link' => 'content',
        ),
        'weight' => 2,
      ),
      'full' => array(
        'label' => 'hidden',
        'type' => 'image',
        'module' => 'image',
        'settings' => array(
          'image_style' => 'thumbnail',
          'image_link' => 'content',
        ),
        'weight' => 2,
      ),
      'teaser' => array(
        'label' => 'hidden',
        'type' => 'image',
        'module' => 'image',
        'settings' => array(
          'image_style' => 'thumbnail',
          'image_link' => 'content',
        ),
        'weight' => 2,
      ),
    ),
    'entity_type' => 'user_badge',
    'bundle' => 'user_badge',
    'required' => TRUE,
    'description' => t('User Badge Image'),
    'field_name' => 'user_badge_image',
  );
  $fields['user_badge_badges'] = array(
    'label' => 'User Badge',
    'widget' => array(
      'weight' => 1,
      'type' => 'entityreference_autocomplete_tags',
      'module' => 'entityreference',
      'active' => TRUE,
      'settings' => array(
        'match_operator' => 'CONTAINS',
        'size' => 60,
        'path' => '',
      ),
    ),
    'settings' => array(
      'user_register_form' => FALSE,
      'entity_translation_sync' => FALSE,
    ),
    'display' => array(
      'default' => array(
        'label' => 'hidden',
        'type' => 'entityreference_entity_view',
        'module' => 'entityreference',
        'settings' => array(
          'view_mode' => 'teaser',
          'links' => FALSE,
        ),
        'weight' => 10,
      ),
      'full' => array(
        'label' => 'hidden',
        'type' => 'entityreference_entity_view',
        'module' => 'entityreference',
        'settings' => array(
          'view_mode' => 'teaser',
          'links' => FALSE,
        ),
        'weight' => 10,
      ),
      'teaser' => array(
        'label' => 'hidden',
        'type' => 'entityreference_label',
        'module' => 'entityreference',
        'settings' => array(
          'link' => TRUE,
          'links' => FALSE,
        ),
        'weight' => 10,
      ),
    ),
    'required' => FALSE,
    'description' => 'User Badge',
    'field_name' => 'user_badge_badges',
    'entity_type' => 'user',
    'bundle' => 'user',
    'deleted' => '0',
    'default_value' => NULL,
  );
  return $fields;
}