function references_views_plugins in References 7.2
Implements hook_views_plugins().
Defines some plugins used by the Views modes for user_reference.
File
- ./
references.module, line 48 - Defines common base features for the various reference field types.
Code
function references_views_plugins() {
$plugins = array(
'display' => array(
'references' => array(
'title' => t('References'),
'admin' => t('References'),
'help' => 'Selects referenceable entities for a reference field (node_reference, user_reference...)',
'handler' => 'references_plugin_display',
'uses hook menu' => FALSE,
'use ajax' => FALSE,
'use pager' => FALSE,
'accept attachments' => FALSE,
// Custom property, used with views_get_applicable_views() to retrieve
// all views with a 'References' display.
'references display' => TRUE,
),
),
'style' => array(
'references_style' => array(
'title' => t('References list'),
'help' => 'Returns results as a PHP array of names + rendered rows.',
'handler' => 'references_plugin_style',
'theme' => 'views_view_unformatted',
'uses row plugin' => TRUE,
'uses fields' => TRUE,
'uses options' => TRUE,
'uses grouping' => TRUE,
'type' => 'references',
'even empty' => TRUE,
),
),
'row' => array(
'references_fields' => array(
'title' => t('Inline fields'),
'help' => t('Displays the fields with an optional template.'),
'handler' => 'references_plugin_row_fields',
'theme' => 'views_view_fields',
'theme path' => drupal_get_path('module', 'views') . '/theme',
'theme file' => 'theme.inc',
'uses fields' => TRUE,
'uses options' => TRUE,
'type' => 'references',
),
),
);
return $plugins;
}