You are here

function user_badges_get_field_bases in User Badges 7.4

Return array of field_bases.

2 calls to user_badges_get_field_bases()
user_badges_install in ./user_badges.install
Implements hook_install().
user_badges_uninstall in ./user_badges.install
Implements hook_uninstall().

File

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

Code

function user_badges_get_field_bases() {
  $fields = array();
  $fields['user_badge_image'] = array(
    'field_name' => 'user_badge_image',
    'type' => 'image',
    'module' => 'image',
    'locked' => FALSE,
    'entity_types' => array(
      'user_badge',
    ),
    'cardinality' => 1,
    'settings' => array(
      'uri_scheme' => 'public',
      'default_image' => FALSE,
    ),
  );
  $fields['user_badge_badges'] = array(
    'translatable' => '0',
    'entity_types' => array(),
    'settings' => array(
      'target_type' => 'user_badge',
      'handler' => 'base',
      'handler_settings' => array(
        'target_bundles' => array(),
        'sort' => array(
          'type' => 'property',
          'property' => 'name',
          'direction' => 'ASC',
        ),
        'behaviors' => array(
          'views-select-list' => array(
            'status' => 1,
          ),
        ),
      ),
      'entity_translation_sync' => FALSE,
    ),
    'foreign keys' => array(
      'user_badge' => array(
        'table' => 'user_badge',
        'columns' => array(
          'target_id' => 'bid',
        ),
      ),
    ),
    'indexes' => array(
      'target_id' => array(
        0 => 'target_id',
      ),
    ),
    'storage' => array(
      'type' => 'field_sql_storage',
      'settings' => array(),
      'module' => 'field_sql_storage',
      'active' => '1',
      'details' => array(
        'sql' => array(
          'FIELD_LOAD_CURRENT' => array(
            'field_data_user_badge_badges' => array(
              'target_id' => 'user_badge_badges_target_id',
            ),
          ),
          'FIELD_LOAD_REVISION' => array(
            'field_revision_user_badge_badges' => array(
              'target_id' => 'user_badge_badges_target_id',
            ),
          ),
        ),
      ),
    ),
    'field_name' => 'user_badge_badges',
    'type' => 'entityreference',
    'module' => 'entityreference',
    'active' => '1',
    'locked' => '0',
    'cardinality' => '-1',
    'deleted' => '0',
    'columns' => array(
      'target_id' => array(
        'description' => 'The id of the target entity.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'bundles' => array(
      'user' => array(
        0 => 'user',
      ),
    ),
  );
  return $fields;
}