Commit 03a3b248 authored by tim.plunkett's avatar tim.plunkett

Issue #1727266 by tim.plunkett: Move PluginBase::getTypes() to View::getPluginTypes().

parent e14fbaa3
......@@ -51,36 +51,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
$this->construct();
}
/**
* Returns the valid types of plugins that can be used.
*
* @return array
* An array of plugin type strings.
*/
public static function getTypes() {
return array(
'access',
'area',
'argument',
'argument_default',
'argument_validator',
'cache',
'display_extender',
'display',
'exposed_form',
'field',
'filter',
'join',
'pager',
'query',
'relationship',
'row',
'sort',
'style',
'wizard',
);
}
/**
* Information about options for all kinds of purposes will be held here.
* @code
......
......@@ -2067,6 +2067,36 @@ public function isTranslatable() {
return (!isset($this->type) || in_array($this->type, array(t('Normal'), t('Overridden')))) ? TRUE : FALSE;
}
/**
* Returns the valid types of plugins that can be used.
*
* @return array
* An array of plugin type strings.
*/
public static function getPluginTypes() {
return array(
'access',
'area',
'argument',
'argument_default',
'argument_validator',
'cache',
'display_extender',
'display',
'exposed_form',
'field',
'filter',
'join',
'pager',
'query',
'relationship',
'row',
'sort',
'style',
'wizard',
);
}
/**
* Provide a list of views handler types used in a view, with some information
* about them.
......
......@@ -9,7 +9,7 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Drupal\views\Plugin\views\PluginBase;
use Drupal\views\View;
/**
* Views dependency injection container.
......@@ -20,7 +20,7 @@ class ViewsBundle extends Bundle {
* Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build().
*/
public function build(ContainerBuilder $container) {
foreach (PluginBase::getTypes() as $type) {
foreach (View::getPluginTypes() as $type) {
$container->register("plugin.manager.views.$type", 'Drupal\views\Plugin\Type\ViewsPluginManager')
->addArgument($type);
}
......
......@@ -12,7 +12,6 @@
use Drupal\Core\Database\Query\AlterableInterface;
use Drupal\views\TempStore\UserTempStore;
use Drupal\views\View;
use Drupal\views\Plugin\views\PluginBase;
use Drupal\Component\Plugin\Exception\PluginException;
/**
......@@ -1427,7 +1426,7 @@ function views_get_plugin($type, $plugin_id) {
*/
function views_get_plugin_definitions($type = FALSE) {
$plugins = array();
$plugin_types = $type ? array($type) : PluginBase::getTypes();
$plugin_types = $type ? array($type) : View::getPluginTypes();
$container = drupal_container();
foreach ($plugin_types as $plugin_type) {
$plugins[$plugin_type] = $container->get("plugin.manager.views.$plugin_type")->getDefinitions();
......
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