diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php index 40abd08..17e7bfa 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php @@ -31,7 +31,7 @@ * * @var string */ - public $handlerType; + public $areaType; /** * Overrides Drupal\views\Plugin\views\HandlerBase::init(). @@ -42,7 +42,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - if ($this->handlerType == 'empty') { + if ($this->areaType == 'empty') { $this->options['empty'] = TRUE; } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php index 321f6f2..5cd4b26 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php @@ -54,7 +54,7 @@ public function preRender(array $results) { // If a title is provided, process it. If the area is for the empty // result set, ensure there are no results. - if (!empty($this->options['title']) && ($this->handlerType != 'empty' || empty($results))) { + if (!empty($this->options['title']) && ($this->areaType != 'empty' || empty($results))) { $value = $this->globalTokenReplace($this->options['title']); $this->view->setTitle($this->sanitizeValue($value, 'xss_admin'), PASS_THROUGH); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 33746a7..444bcb8 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -7,6 +7,7 @@ namespace Drupal\views\Plugin\views\display; +use Drupal\views\Plugin\views\area\AreaPluginBase; use Drupal\views\ViewExecutable; use \Drupal\views\Plugin\views\PluginBase; use Drupal\views\Views; @@ -878,8 +879,8 @@ public function getHandlers($type) { $handler = views_get_handler($info['table'], $info['field'], $handler_type, $override); if ($handler) { // Special override for area types so they know where they come from. - if ($handler_type == 'area') { - $handler->handlerType = $type; + if ($handler instanceof AreaPluginBase) { + $handler->areaType = $type; } $handler->init($this->view, $this, $info);