function entityreference_views_plugins in Entity reference 7
Implements hook_views_plugins().
File
- views/
entityreference.views.inc, line 102 - Views integration for Entity Reference.
Code
function entityreference_views_plugins() {
$plugins = array(
'display' => array(
'entityreference' => array(
'title' => t('Entity Reference'),
'admin' => t('Entity Reference Source'),
'help' => 'Selects referenceable entities for an entity reference field',
'handler' => 'entityreference_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 'Entity Reference' display.
'entityreference display' => TRUE,
),
),
'style' => array(
'entityreference_style' => array(
'title' => t('Entity Reference list'),
'help' => 'Returns results as a PHP array of labels and rendered rows.',
'handler' => 'entityreference_plugin_style',
'theme' => 'views_view_unformatted',
'theme path' => drupal_get_path('module', 'views') . '/theme',
'theme file' => 'theme.inc',
'uses row plugin' => TRUE,
'uses fields' => TRUE,
'uses options' => TRUE,
'type' => 'entityreference',
'even empty' => TRUE,
),
),
'row' => array(
'entityreference_fields' => array(
'title' => t('Inline fields'),
'help' => t('Displays the fields with an optional template.'),
'handler' => 'entityreference_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' => 'entityreference',
),
),
);
return $plugins;
}