Commit 625cb74a authored by tim.plunkett's avatar tim.plunkett

Remove the obsolete includes/plugins.inc.

parent 7c26528e
<?php
/**
* @file
* Built in plugins for Views output handling.
*/
use Drupal\views\ViewsObject;
/**
* Builds and return a list of all plugins available in the system.
*
* @return Nested array of plugins, grouped by type.
*/
function views_discover_plugins() {
$cache = array('display' => array(), 'style' => array(), 'row' => array(), 'argument default' => array(), 'argument validator' => array(), 'access' => array(), 'cache' => array(), 'exposed_form' => array());
// Get plugins from all mdoules.
foreach (module_implements('views_plugins') as $module) {
$function = $module . '_views_plugins';
$result = $function();
if (!is_array($result)) {
continue;
}
$module_dir = isset($result['module']) ? $result['module'] : $module;
// Setup automatic path/file finding for theme registration
if ($module_dir == 'views') {
$theme_path = drupal_get_path('module', $module_dir) . '/theme';
$theme_file = 'theme.inc';
$path = drupal_get_path('module', $module_dir) . '/plugins';
}
else {
$theme_path = $path = drupal_get_path('module', $module_dir);
$theme_file = "$module.views.inc";
}
foreach ($result as $type => $info) {
if ($type == 'module') {
continue;
}
foreach ($info as $plugin => $def) {
$def['module'] = $module_dir;
if (!isset($def['theme path'])) {
$def['theme path'] = $theme_path;
}
if (!isset($def['theme file'])) {
$def['theme file'] = $theme_file;
}
if (!isset($def['path'])) {
$def['path'] = $path;
}
// if (!isset($def['file'])) {
// $def['file'] = $def['handler'] . '.inc';
// }
if (!isset($def['parent'])) {
$def['parent'] = 'parent';
}
// Set the internal name to be able to read it out later.
$def['name'] = $plugin;
// merge the new data in
$cache[$type][$plugin] = $def;
}
}
}
// Let other modules modify the plugins.
drupal_alter('views_plugins', $cache);
return $cache;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment