diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/display/EntityReference.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/display/EntityReference.php index 512f4070ae0..450dad34975 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/display/EntityReference.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/display/EntityReference.php @@ -99,7 +99,7 @@ class EntityReference extends DisplayPluginBase { * Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::render(). */ public function render() { - if (!empty($this->view->result) && $this->view->style_plugin->even_empty()) { + if (!empty($this->view->result) && $this->view->style_plugin->evenEmpty()) { return $this->view->style_plugin->render($this->view->result); } return ''; diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/style/EntityReference.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/style/EntityReference.php index 4b054a3ed40..c6068562a0a 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/style/EntityReference.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/views/style/EntityReference.php @@ -102,9 +102,9 @@ class EntityReference extends StylePluginBase { } /** - * Overrides \Drupal\views\Plugin\views\style\StylePluginBase\StylePluginBase::even_empty(). + * {@inheritdoc} */ - function even_empty() { + public function evenEmpty() { return TRUE; } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php index 18b01cb5d48..76bbb4250be 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/StylePluginBase.php @@ -224,7 +224,7 @@ abstract class StylePluginBase extends PluginBase { /** * Should the output of the style plugin be rendered even if it's a empty view. */ - function even_empty() { + public function evenEmpty() { return !empty($this->definition['even empty']); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php index 06bffcb093d..f6fe7e51792 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/style/Table.php @@ -387,8 +387,8 @@ class Table extends StylePluginBase { ); } - function even_empty() { - return parent::even_empty() || !empty($this->options['empty_table']); + public function evenEmpty() { + return parent::evenEmpty() || !empty($this->options['empty_table']); } public function wizardSubmit(&$form, &$form_state, WizardInterface $wizard, &$display_options, $display_type) { diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 40ff1d5c2e1..f604637e1c1 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -54,7 +54,7 @@ function template_preprocess_views_view(&$vars) { $view = $vars['view']; - $vars['rows'] = (!empty($view->result) || $view->style_plugin->even_empty()) ? $view->style_plugin->render($view->result) : array(); + $vars['rows'] = (!empty($view->result) || $view->style_plugin->evenEmpty()) ? $view->style_plugin->render($view->result) : array(); // Force a render array so CSS/JS can be added. if (!is_array($vars['rows'])) { $vars['rows'] = array('#markup' => $vars['rows']);