View source
<?php
function message_og_example_field_default_fields() {
$fields = array();
$fields['message-example_og_post_in_group-field_node_groups_ref'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '-1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_node_groups_ref',
'foreign keys' => array(
'node' => array(
'columns' => array(
'target_id' => 'nid',
),
'table' => 'node',
),
),
'indexes' => array(
'target_id' => array(
0 => 'target_id',
),
),
'module' => 'entityreference',
'settings' => array(
'handler' => 'base',
'handler_settings' => array(
'behaviors' => array(
'views-select-list' => array(
'status' => 0,
),
),
'sort' => array(
'direction' => 'ASC',
'field' => 'body:value',
'property' => 'nid',
'type' => 'none',
),
'target_bundles' => array(),
),
'handler_submit' => 'Change handler',
'target_type' => 'node',
),
'translatable' => '0',
'type' => 'entityreference',
),
'field_instance' => array(
'bundle' => 'example_og_post_in_group',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'entityreference',
'settings' => array(
'link' => FALSE,
),
'type' => 'entityreference_label',
'weight' => 2,
),
),
'entity_type' => 'message',
'field_name' => 'field_node_groups_ref',
'label' => 'Groups reference',
'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' => '0',
),
),
);
$fields['message-example_og_post_in_group-field_node_ref'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_node_ref',
'foreign keys' => array(
'node' => array(
'columns' => array(
'target_id' => 'nid',
),
'table' => 'node',
),
),
'indexes' => array(
'target_id' => array(
0 => 'target_id',
),
),
'module' => 'entityreference',
'settings' => array(
'handler' => 'base',
'handler_settings' => array(
'behaviors' => array(
'views-select-list' => array(
'status' => 0,
),
),
'sort' => array(
'direction' => 'ASC',
'field' => 'body:value',
'property' => 'nid',
'type' => 'none',
),
'target_bundles' => array(),
),
'handler_submit' => 'Change handler',
'target_bundles' => array(),
'target_type' => 'node',
),
'translatable' => '0',
'type' => 'entityreference',
),
'field_instance' => array(
'bundle' => 'example_og_post_in_group',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'entityreference',
'settings' => array(
'link' => FALSE,
),
'type' => 'entityreference_label',
'weight' => 0,
),
),
'entity_type' => 'message',
'field_name' => 'field_node_ref',
'label' => 'Node reference',
'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' => '1',
),
),
);
$fields['message-example_og_post_in_group-field_published'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_published',
'foreign keys' => array(),
'indexes' => array(
'value' => array(
0 => 'value',
),
),
'module' => 'list',
'settings' => array(
'allowed_values' => array(
0 => 'Unpublished',
1 => 'Published',
),
'allowed_values_function' => '',
),
'translatable' => '0',
'type' => 'list_boolean',
),
'field_instance' => array(
'bundle' => 'example_og_post_in_group',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 1,
),
),
'entity_type' => 'message',
'field_name' => 'field_published',
'label' => 'Published',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_buttons',
'weight' => '2',
),
),
);
$fields['message-example_og_user_membership-field_node_groups_ref'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '-1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_node_groups_ref',
'foreign keys' => array(
'node' => array(
'columns' => array(
'target_id' => 'nid',
),
'table' => 'node',
),
),
'indexes' => array(
'target_id' => array(
0 => 'target_id',
),
),
'module' => 'entityreference',
'settings' => array(
'handler' => 'base',
'handler_settings' => array(
'behaviors' => array(
'views-select-list' => array(
'status' => 0,
),
),
'sort' => array(
'direction' => 'ASC',
'field' => 'body:value',
'property' => 'nid',
'type' => 'none',
),
'target_bundles' => array(),
),
'handler_submit' => 'Change handler',
'target_type' => 'node',
),
'translatable' => '0',
'type' => 'entityreference',
),
'field_instance' => array(
'bundle' => 'example_og_user_membership',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'entityreference',
'settings' => array(
'link' => FALSE,
),
'type' => 'entityreference_label',
'weight' => 2,
),
),
'entity_type' => 'message',
'field_name' => 'field_node_groups_ref',
'label' => 'Groups reference',
'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' => '0',
),
),
);
$fields['message-example_og_user_membership-field_published'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'field_published',
'foreign keys' => array(),
'indexes' => array(
'value' => array(
0 => 'value',
),
),
'module' => 'list',
'settings' => array(
'allowed_values' => array(
0 => 'Unpublished',
1 => 'Published',
),
'allowed_values_function' => '',
),
'translatable' => '0',
'type' => 'list_boolean',
),
'field_instance' => array(
'bundle' => 'example_og_user_membership',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'above',
'module' => 'list',
'settings' => array(),
'type' => 'list_default',
'weight' => 1,
),
),
'entity_type' => 'message',
'field_name' => 'field_published',
'label' => 'Published',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_buttons',
'weight' => '1',
),
),
);
t('Groups reference');
t('Node reference');
t('Published');
return $fields;
}