1 entityreference.views.inc | entityreference_views_plugins() |
Implements hook_views_plugins().
File
- core/
modules/ entityreference/ views/ entityreference.views.inc, line 111 - Views integration for Entity Reference.
Code
function entityreference_views_plugins() {
$plugins = array(
'display' => array(
'entityreference' => array(
'title' => t('Entity Reference'),
'admin' => t('Reference Source'),
'help' => 'Selects referenceable entities for a 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 list of labels and rendered rows.',
'handler' => 'entityreference_plugin_style',
'theme' => 'views_view_unformatted',
'theme path' => backdrop_get_path('module', 'views') . '/templates',
'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' => backdrop_get_path('module', 'views') . '/templates',
'theme file' => 'theme.inc',
'uses fields' => TRUE,
'uses options' => TRUE,
'type' => 'entityreference',
),
),
);
return $plugins;
}