function pmnote_default_field_instances in Drupal PM (Project Management) 7.2
Same name and namespace in other branches
- 8 pmnote/includes/pmnote.field_instance.inc \pmnote_default_field_instances()
- 7.3 pmnote/includes/pmnote.field_instance.inc \pmnote_default_field_instances()
Field instance definitions for PM Note.
2 calls to pmnote_default_field_instances()
- pmnote_migrate_create_fields in pmnote/
includes/ pmnote.migrate.inc - Creates and attaches fields to Drupal user.
- pmnote_uninstall in pmnote/
pmnote.install - Implements hook_uninstall().
File
- pmnote/
includes/ pmnote.field_instance.inc, line 10 - Field instance definitions for the PM Note module.
Code
function pmnote_default_field_instances() {
$field_instances = array();
// Exported field_instance: 'node-pmnote-body'
$field_instances['node-pmnote-body'] = array(
'bundle' => 'pmnote',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(),
'type' => 'text_default',
'weight' => 0,
),
'teaser' => array(
'label' => 'hidden',
'module' => 'text',
'settings' => array(
'trim_length' => 600,
),
'type' => 'text_summary_or_trimmed',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'body',
'label' => 'Description',
'required' => FALSE,
'settings' => array(
'display_summary' => TRUE,
'text_processing' => 1,
'user_register_form' => FALSE,
),
'widget' => array(
'module' => 'text',
'settings' => array(
'rows' => 20,
'summary_rows' => 5,
),
'type' => 'text_textarea_with_summary',
'weight' => 3,
),
);
// Exported field_instance: 'node-pmnote-pmnote_parent'
$field_instances['node-pmnote-pmnote_parent'] = array(
'bundle' => 'pmnote',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'inline',
'module' => 'entityreference',
'settings' => array(
'link' => FALSE,
),
'type' => 'entityreference_label',
'weight' => 1,
),
'teaser' => array(
'label' => 'inline',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'node',
'field_name' => 'pmnote_parent',
'label' => 'Organization/Project/Task',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'entityreference',
'settings' => array(
'match_operator' => 'CONTAINS',
'path' => '',
'size' => 60,
),
'type' => 'entityreference_autocomplete',
'weight' => 2,
),
);
// Translatables
// Included for use with string extractors like potx.
t('Description');
t('Organization/Project/Task');
return $field_instances;
}