function answers_notifications_default_fields in Answers 7.4
Provide the structure for the fields required by answers_notifications.
2 calls to answers_notifications_default_fields()
- answers_notifications_install in answers_notifications/
answers_notifications.install - Implements hook_install().
- answers_notifications_uninstall in answers_notifications/
answers_notifications.install - Implements hook_uninstall().
File
- answers_notifications/
answers_notifications.install, line 51 - Notifications support for Answers.
Code
function answers_notifications_default_fields() {
$fields = array();
// Exported field:
// 'message-new_answer-field_answers_notifications_message_answer'.
$fields['message-new_answer-field_answers_notifications_message_answer'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'answers_notifications_answer',
'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(
'type' => 'none',
),
'target_bundles' => array(
'answers_answer' => 'answers_answer',
),
),
'target_type' => 'node',
),
'translatable' => '0',
'type' => 'entityreference',
),
'field_instance' => array(
'bundle' => 'answers_notifications_new_answer',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => '0',
),
'message_notify_email_body' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'message_notify_email_subject' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'message',
'field_name' => 'answers_notifications_answer',
'label' => 'message_answer',
'required' => 1,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_select',
'weight' => '1',
),
),
);
// Exported field:
// 'message-new_answer-field_answers_notifications_message_question'.
$fields['message-new_answer-field_answers_notifications_message_question'] = array(
'field_config' => array(
'active' => '1',
'cardinality' => '1',
'deleted' => '0',
'entity_types' => array(),
'field_name' => 'answers_notifications_question',
'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(
'type' => 'none',
),
'target_bundles' => array(
'answers_question' => 'answers_question',
),
),
'target_type' => 'node',
),
'translatable' => '0',
'type' => 'entityreference',
),
'field_instance' => array(
'bundle' => 'answers_notifications_new_answer',
'default_value' => NULL,
'deleted' => '0',
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'settings' => array(),
'type' => 'hidden',
'weight' => '1',
),
'message_notify_email_body' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
'message_notify_email_subject' => array(
'label' => 'above',
'settings' => array(),
'type' => 'hidden',
'weight' => 0,
),
),
'entity_type' => 'message',
'field_name' => 'answers_notifications_question',
'label' => 'message_question',
'required' => 1,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'options',
'settings' => array(),
'type' => 'options_select',
'weight' => '2',
),
),
);
// Translatables
// Included for use with string extractors like potx.
t('message_answer');
t('message_question');
return $fields;
}