Commit c4e15352 authored by alexpott's avatar alexpott

Issue #2002486 by crowdcg, shixish: Rename Views method even_empty() to evenEmpty().

parent 7731380b
......@@ -99,7 +99,7 @@ public function execute() {
* 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 '';
......
......@@ -102,9 +102,9 @@ public function render() {
}
/**
* Overrides \Drupal\views\Plugin\views\style\StylePluginBase\StylePluginBase::even_empty().
* {@inheritdoc}
*/
function even_empty() {
public function evenEmpty() {
return TRUE;
}
}
......@@ -224,7 +224,7 @@ public function tokenizeValue($value, $row_index) {
/**
* 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']);
}
......
......@@ -387,8 +387,8 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
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) {
......
......@@ -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']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment