function views_views_plugins in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 includes/plugins.inc \views_views_plugins()
- 7.3 includes/plugins.inc \views_views_plugins()
Implementation of hook_views_plugins
File
- includes/
plugins.inc, line 11 - plugins.inc Built in plugins for Views output handling.
Code
function views_views_plugins() {
$path = drupal_get_path('module', 'views') . '/js';
$plugins = array(
'module' => 'views',
// This just tells our themes are elsewhere.
'display' => array(
'parent' => array(
// this isn't really a display but is necessary so the file can
// be included.
'no ui' => TRUE,
'handler' => 'views_plugin_display',
'parent' => '',
),
'default' => array(
'title' => t('Defaults'),
'help' => t('Default settings for this view.'),
'handler' => 'views_plugin_display_default',
'theme' => 'views_view',
'no ui' => TRUE,
'no remove' => TRUE,
'js' => array(
'misc/collapse.js',
'misc/textarea.js',
'misc/tabledrag.js',
'misc/autocomplete.js',
"{$path}/dependent.js",
),
'use ajax' => TRUE,
'use pager' => TRUE,
'use more' => TRUE,
'accept attachments' => TRUE,
'help topic' => 'display-default',
),
'page' => array(
'title' => t('Page'),
'help' => t('Display the view as a page, with a URL and menu links.'),
'handler' => 'views_plugin_display_page',
'theme' => 'views_view',
'uses hook menu' => TRUE,
'use ajax' => TRUE,
'use pager' => TRUE,
'accept attachments' => TRUE,
'admin' => t('Page'),
'help topic' => 'display-page',
),
'block' => array(
'title' => t('Block'),
'help' => t('Display the view as a block.'),
'handler' => 'views_plugin_display_block',
'theme' => 'views_view',
'uses hook block' => TRUE,
'use ajax' => TRUE,
'use pager' => TRUE,
'use more' => TRUE,
'accept attachments' => TRUE,
'admin' => t('Block'),
'help topic' => 'display-block',
),
'attachment' => array(
'title' => t('Attachment'),
'help' => t('Attachments added to other displays to achieve multiple views in the same view.'),
'handler' => 'views_plugin_display_attachment',
'theme' => 'views_view',
'use ajax' => TRUE,
'help topic' => 'display-attachment',
),
'feed' => array(
'title' => t('Feed'),
'help' => t('Display the view as a feed, such as an RSS feed.'),
'handler' => 'views_plugin_display_feed',
'parent' => 'page',
// so it knows to load the page plugin .inc file
'uses hook menu' => TRUE,
'use ajax' => FALSE,
'use pager' => FALSE,
'accept attachments' => FALSE,
'admin' => t('Feed'),
'help topic' => 'display-feed',
),
),
'style' => array(
'parent' => array(
// this isn't really a display but is necessary so the file can
// be included.
'no ui' => TRUE,
'handler' => 'views_plugin_style',
'parent' => '',
),
'default' => array(
'title' => t('Unformatted'),
'help' => t('Displays rows one after another.'),
'handler' => 'views_plugin_style_default',
'theme' => 'views_view_unformatted',
'uses row plugin' => TRUE,
'uses grouping' => TRUE,
'uses options' => TRUE,
'type' => 'normal',
'help topic' => 'style-unformatted',
),
'list' => array(
'title' => t('HTML List'),
'help' => t('Displays rows as an HTML list.'),
'handler' => 'views_plugin_style_list',
'theme' => 'views_view_list',
'uses row plugin' => TRUE,
'uses options' => TRUE,
'type' => 'normal',
'help topic' => 'style-list',
),
'grid' => array(
'title' => t('Grid'),
'help' => t('Displays rows in a grid.'),
'handler' => 'views_plugin_style_grid',
'theme' => 'views_view_grid',
'uses row plugin' => TRUE,
'uses options' => TRUE,
'type' => 'normal',
'help topic' => 'style-grid',
),
'table' => array(
'title' => t('Table'),
'help' => t('Displays rows in a table.'),
'handler' => 'views_plugin_style_table',
'theme' => 'views_view_table',
'uses row plugin' => FALSE,
'uses fields' => TRUE,
'uses options' => TRUE,
'type' => 'normal',
'help topic' => 'style-table',
),
'default_summary' => array(
'title' => t('List'),
'help' => t('Displays the default summary as a list.'),
'handler' => 'views_plugin_style_summary',
'theme' => 'views_view_summary',
'type' => 'summary',
// only shows up as a summary style
'uses options' => TRUE,
'help topic' => 'style-summary',
),
'unformatted_summary' => array(
'title' => t('Unformatted'),
'help' => t('Displays the summary unformatted, with option for one after another or inline.'),
'handler' => 'views_plugin_style_summary_unformatted',
'parent' => 'default_summary',
'theme' => 'views_view_summary_unformatted',
'type' => 'summary',
// only shows up as a summary style
'uses options' => TRUE,
'help topic' => 'style-summary-unformatted',
),
'rss' => array(
'title' => t('RSS Feed'),
'help' => t('Generates an RSS feed from a view.'),
'handler' => 'views_plugin_style_rss',
'theme' => 'views_view_rss',
'uses row plugin' => TRUE,
'uses options' => TRUE,
'type' => 'feed',
'help topic' => 'style-rss',
),
),
'row' => array(
'parent' => array(
// this isn't really a display but is necessary so the file can
// be included.
'no ui' => TRUE,
'handler' => 'views_plugin_row',
'parent' => '',
),
'fields' => array(
'title' => t('Fields'),
'help' => t('Displays the fields with an optional template.'),
'handler' => 'views_plugin_row_fields',
'theme' => 'views_view_fields',
'uses fields' => TRUE,
'uses options' => TRUE,
'type' => 'normal',
'help topic' => 'style-row-fields',
),
),
'argument default' => array(
// This type of plugin does not conform to the standard and
// uses 'fixed' as the parent rather than having a separate parent.
'fixed' => array(
'title' => t('Fixed entry'),
'handler' => 'views_plugin_argument_default',
),
'php' => array(
'title' => t('PHP Code'),
'handler' => 'views_plugin_argument_default_php',
'parent' => 'fixed',
),
),
'argument validator' => array(
'parent' => array(
'no ui' => TRUE,
'handler' => 'views_plugin_argument_validate',
'parent' => '',
),
'php' => array(
'title' => t('PHP Code'),
'handler' => 'views_plugin_argument_validate_php',
),
'numeric' => array(
'title' => t('Numeric'),
'handler' => 'views_plugin_argument_validate_numeric',
),
),
'access' => array(
'parent' => array(
'no ui' => TRUE,
'handler' => 'views_plugin_access',
'parent' => '',
),
'none' => array(
'title' => t('None'),
'help' => t('Will be available to all users.'),
'handler' => 'views_plugin_access_none',
'help topic' => 'access-none',
),
'role' => array(
'title' => t('Role'),
'help' => t('Access will be granted to users with any of the specified roles.'),
'handler' => 'views_plugin_access_role',
'uses options' => TRUE,
'help topic' => 'access-role',
),
'perm' => array(
'title' => t('Permission'),
'help' => t('Access will be granted to users with the specified permission string.'),
'handler' => 'views_plugin_access_perm',
'uses options' => TRUE,
'help topic' => 'access-perm',
),
),
'cache' => array(
'parent' => array(
'no ui' => TRUE,
'handler' => 'views_plugin_cache',
'parent' => '',
),
'none' => array(
'title' => t('None'),
'help' => t('No caching of Views data.'),
'handler' => 'views_plugin_cache_none',
'help topic' => 'cache-none',
),
'time' => array(
'title' => t('Time-based'),
'help' => t('Simple time-based caching of data.'),
'handler' => 'views_plugin_cache_time',
'uses options' => TRUE,
'help topic' => 'cache-time',
),
),
);
if (module_invoke('ctools', 'api_version', '1.3')) {
$plugins['style']['jump_menu_summary'] = array(
'title' => t('Jump menu'),
'help' => t('Puts all of the results into a select box and allows the user to go to a different page based upon the results.'),
'handler' => 'views_plugin_style_summary_jump_menu',
'theme' => 'views_view_summary_jump_menu',
'type' => 'summary',
// only shows up as a summary style
'uses options' => TRUE,
'help topic' => 'style-summary-jump-menu',
);
$plugins['style']['jump_menu'] = array(
'title' => t('Jump menu'),
'help' => t('Puts all of the results into a select box and allows the user to go to a different page based upon the results.'),
'handler' => 'views_plugin_style_jump_menu',
'theme' => 'views_view_jump_menu',
'uses row plugin' => TRUE,
'uses fields' => TRUE,
'uses options' => TRUE,
'type' => 'normal',
'help topic' => 'style-jump-menu',
);
}
return $plugins;
}