Skip to content
Snippets Groups Projects
Commit 86dc2687 authored by Daniel Wehner's avatar Daniel Wehner Committed by Tim Plunkett
Browse files

Issue #1677784 by kenneth.venken, dawehner: Follow up, Make sure the empty...

Issue #1677784 by kenneth.venken, dawehner: Follow up, Make sure the empty area is rendered on empty results.
parent 073d932d
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -18,6 +18,20 @@
* @ingroup views_area_handlers
*/
class views_handler_area extends views_handler {
/**
* Overrides views_handler::init().
*
* Make sure that no result area handlers are set to be shown when the result
* is empty.
*/
function init(&$view, &$options) {
parent::init($view, $options);
if ($this->handler_type == 'empty') {
$this->options['empty'] = TRUE;
}
}
/**
* Get this field's label.
*/
......@@ -34,7 +48,7 @@ function option_definition() {
$this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : '';
$label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
$options['label'] = array('default' => $label, 'translatable' => TRUE);
$options['empty'] = array('default' => 0, 'bool' => TRUE);
$options['empty'] = array('default' => FALSE, 'bool' => TRUE);
return $options;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment