diff --git a/lib/Drupal/views/Plugin/views/PluginBase.php b/lib/Drupal/views/Plugin/views/PluginBase.php index f236b497f2a286d7515b2a5a88c2b3209adde244..ba56409768529603efeacb1d68a06b8bf6dc0032 100644 --- a/lib/Drupal/views/Plugin/views/PluginBase.php +++ b/lib/Drupal/views/Plugin/views/PluginBase.php @@ -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 diff --git a/lib/Drupal/views/View.php b/lib/Drupal/views/View.php index fcba53e5ac8273916e30cbf9eab5e0b51713473e..3d6b3b77cb4f12b3dcb2ea80410efc95d33ae6be 100644 --- a/lib/Drupal/views/View.php +++ b/lib/Drupal/views/View.php @@ -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. diff --git a/lib/Drupal/views/ViewsBundle.php b/lib/Drupal/views/ViewsBundle.php index 6342662fcf231b52dc0eb78656d506c2accbc5dc..58ccc83b9a4d959b865335d6d6ef10473f059e1f 100644 --- a/lib/Drupal/views/ViewsBundle.php +++ b/lib/Drupal/views/ViewsBundle.php @@ -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); } diff --git a/views.module b/views.module index ace1cf1de8364b29dfe9389af11ff074de9a0964..fb49705a1321583de51b36af5d75177d3b48d08b 100644 --- a/views.module +++ b/views.module @@ -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();