diff -u b/src/Plugin/views/display/Eva.php b/src/Plugin/views/display/Eva.php --- b/src/Plugin/views/display/Eva.php +++ b/src/Plugin/views/display/Eva.php @@ -402,23 +402,24 @@ - if (!empty($this->view->result) || $this->getOption('empty') || !empty($this->view->style_plugin->definition['even empty'])) { + if ($this->shouldDisplayOutput()) { return $element; } return []; } -} - /** - * {@inheritdoc} + * Helper method to decide whether to display an EVA element. + * + * Will return true if any are true: + * - any header, footer, or empty region is set + * - EVA "hide output if the view is empty" option is set to FALSE + * - Style plugin option "hide empty fields" is set to FALSE + * + * @return bool */ - public function buildRenderable(array $args = [], $cache = TRUE) { - $this->view->render(); - if ($this->outputIsEmpty() && $this->getOption('eva_hide_empty') && !$this->view->getStyle()->evenEmpty()) { - return []; - } - else { - return parent::buildRenderable($args, $cache); - } + protected function shouldDisplayOutput() { + return !$this->outputIsEmpty() || !$this->getOption('eva_hide_empty') || $this->view->style_plugin->evenEmpty(); } } + +}