function references_dialog_references_dialog_widgets in References dialog 7
Implements hook_references_dialog_widgets().
File
- ./
references_dialog.dialog_widgets.inc, line 11 - Implements dialogs for node reference and user reference fields.
Code
function references_dialog_references_dialog_widgets() {
return array(
'node_reference_autocomplete' => array(
'element_type' => 'textfield',
'dialog_form' => 'node_reference_dialog_form',
'entity_type' => 'node',
'format' => '$label [nid: $entity_id]',
'views_query' => 'references_dialog_node_reference_views_query',
'operations' => array(
'search' => array(
'function' => 'references_dialog_get_field_search_links',
'title' => t('Search Dialog'),
),
'edit' => array(
'function' => 'references_dialog_node_reference_edit_link',
'title' => t('Edit dialog'),
),
'add' => array(
'function' => 'references_dialog_node_reference_add_link',
'title' => t('Add dialog'),
),
),
),
'user_reference_autocomplete' => array(
'element_type' => 'textfield',
'entity_type' => 'user',
'format' => '$label [uid: $entity_id]',
'operations' => array(
'search' => array(
'function' => 'references_dialog_get_field_search_links',
'title' => t('Search Dialog'),
),
'edit' => array(
'function' => 'references_dialog_user_reference_edit_link',
'title' => t('Edit dialog'),
),
'add' => array(
'function' => 'references_dialog_user_reference_add_link',
'title' => t('Add dialog'),
),
),
),
'entityreference_autocomplete' => array(
'element_type' => 'textfield',
'dialog_form' => 'entityreference_autocomplete_dialog_form',
'views_query' => 'references_dialog_entityreference_views_query',
'type_callback' => 'references_dialog_entityreference_get_type',
'format' => '$label ($entity_id)',
'operations' => array(
'edit' => array(
'function' => 'references_dialog_entityreference_edit_link',
'title' => t('Edit dialog'),
),
'add' => array(
'function' => 'references_dialog_entityreference_add_link',
'title' => t('Add dialog'),
),
'search' => array(
'function' => 'references_dialog_get_field_search_links',
'title' => t('Search Dialog'),
),
),
),
'references_dialog_term_reference' => array(
'element_type' => 'textfield',
'dialog_form' => 'term_reference_dialog_form',
'entity_type' => 'taxonomy_term',
'format' => '$label',
'views_query' => 'references_dialog_term_reference_views_query',
'operations' => array(
'search' => array(
'function' => 'references_dialog_get_field_search_links',
'title' => t('Search Dialog'),
),
'edit' => array(
'function' => 'references_dialog_term_reference_edit_link',
'title' => t('Edit dialog'),
),
'add' => array(
'function' => 'references_dialog_term_reference_add_link',
'title' => t('Add dialog'),
),
),
),
);
}