From 1e9804a9238fb1f9ff24b1647297ad2ec0b6e4e2 Mon Sep 17 00:00:00 2001 From: aspilicious <aspilicious@172527.no-reply.drupal.org> Date: Sat, 8 Sep 2012 18:46:47 -0400 Subject: [PATCH] Issue #1778960 by aspilicious, tim.plunkett: Remove pluginType property. --- lib/Drupal/views/Plugin/views/HandlerBase.php | 6 +++--- lib/Drupal/views/Plugin/views/PluginBase.php | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/Drupal/views/Plugin/views/HandlerBase.php b/lib/Drupal/views/Plugin/views/HandlerBase.php index fc82ae9c009d..0449174b9d07 100644 --- a/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -105,9 +105,9 @@ public function init(&$view, &$options) { } $types = View::viewsHandlerTypes(); - $plural = $this->pluginType; - if (isset($types[$this->pluginType]['plural'])) { - $plural = $types[$this->pluginType]['plural']; + $plural = $this->definition['plugin_type']; + if (isset($types[$plural]['plural'])) { + $plural = $types[$plural]['plural']; } if ($this->view->display_handler->isDefaulted($plural)) { $display_id = 'default'; diff --git a/lib/Drupal/views/Plugin/views/PluginBase.php b/lib/Drupal/views/Plugin/views/PluginBase.php index 997035740435..a28a1b8bc418 100644 --- a/lib/Drupal/views/Plugin/views/PluginBase.php +++ b/lib/Drupal/views/Plugin/views/PluginBase.php @@ -33,11 +33,6 @@ abstract class PluginBase extends ComponentPluginBase { */ public $definition; - /** - * The plugin type of this plugin, for example style or query. - */ - public $pluginType = NULL; - /** * Denotes whether the plugin has an additional options form. * @@ -53,9 +48,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface $this->definition = $this->discovery->getDefinition($plugin_id) + $configuration; - // @todo Change calls to $this->pluginType to use the definition directly. - $this->pluginType = $this->definition['plugin_type']; - // @todo Change calls to $this->real_field to use the definition directly. if (isset($this->definition['field'])) { $this->realField = $this->definition['field']; -- GitLab