You are here

function pmteam_default_field_bases in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmteam/includes/pmteam.field_base.inc \pmteam_default_field_bases()
  2. 7.2 pmteam/includes/pmteam.field_base.inc \pmteam_default_field_bases()

Implements hook_field_default_field_bases().

2 calls to pmteam_default_field_bases()
pmteam_migrate_create_fields in pmteam/includes/pmteam.migrate.inc
Creates and attaches fields to Drupal user.
pmteam_update_7300 in pmteam/pmteam.install
Use pm_entity_reference_user_filter for pmteam_user.

File

pmteam/includes/pmteam.field_base.inc, line 10
Field definitions for the PM Team module.

Code

function pmteam_default_field_bases() {
  $field_bases = array();

  // Exported field_base: 'pmteam_user'.
  $field_bases['pmteam_user'] = array(
    'active' => 1,
    'cardinality' => -1,
    'deleted' => 0,
    'entity_types' => array(),
    'field_name' => 'pmteam_user',
    'indexes' => array(
      'target_id' => array(
        0 => 'target_id',
      ),
    ),
    'locked' => 0,
    'module' => 'entityreference',
    'settings' => array(
      'handler' => 'views',
      'handler_settings' => array(
        'behaviors' => array(
          'views-select-list' => array(
            'status' => 0,
          ),
        ),
        'view' => array(
          'args' => array(),
          'display_name' => 'pm_user_filter',
          'view_name' => 'pm_entity_reference_user_filter',
        ),
      ),
      'target_type' => 'user',
    ),
    'translatable' => 0,
    'type' => 'entityreference',
  );

  // Exported field_base: 'pmteam_organization'
  $field_bases['pmteam_organization'] = array(
    'active' => 1,
    'cardinality' => 1,
    'deleted' => 0,
    'entity_types' => array(),
    'field_name' => 'pmteam_organization',
    'foreign keys' => array(
      'node' => array(
        'columns' => array(
          'target_id' => 'nid',
        ),
        'table' => 'node',
      ),
    ),
    'indexes' => array(
      'target_id' => array(
        0 => 'target_id',
      ),
    ),
    'locked' => 0,
    'module' => 'entityreference',
    'settings' => array(
      'handler' => 'base',
      'handler_settings' => array(
        'behaviors' => array(
          'views-select-list' => array(
            'status' => 0,
          ),
        ),
        'sort' => array(
          'direction' => 'ASC',
          'property' => 'title',
          'type' => 'property',
        ),
        'target_bundles' => array(
          'pmorganization' => 'pmorganization',
        ),
      ),
      'target_type' => 'node',
    ),
    'translatable' => 0,
    'type' => 'entityreference',
  );

  // Exported field_base: 'body'.
  $field_bases['body'] = array(
    'active' => 1,
    'cardinality' => 1,
    'deleted' => 0,
    'entity_types' => array(
      0 => 'node',
    ),
    'field_name' => 'body',
    'indexes' => array(
      'format' => array(
        0 => 'format',
      ),
    ),
    'locked' => 0,
    'module' => 'text',
    'settings' => array(),
    'translatable' => 0,
    'type' => 'text_with_summary',
  );
  return $field_bases;
}