Issue #2002486 by crowdcg, shixish: Rename Views method even_empty() to evenEmpty().
parent
7731380b6b
commit
c4e1535220
|
@ -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 '';
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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']);
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Reference in New Issue