You are here

public function AreaPluginBase::init in Views (for Drupal 7) 8.3

Overrides Drupal\views\Plugin\views\HandlerBase::init().

Make sure that no result area handlers are set to be shown when the result is empty.

Overrides HandlerBase::init

File

lib/Drupal/views/Plugin/views/area/AreaPluginBase.php, line 34
Definition of Drupal\views\Plugin\views\area\AreaPluginBase.

Class

AreaPluginBase
Base class for area handlers.

Namespace

Drupal\views\Plugin\views\area

Code

public function init(ViewExecutable $view, &$options) {
  $this
    ->setOptionDefaults($this->options, $this
    ->defineOptions());
  parent::init($view, $options);
  if (isset($this->handler_type) && $this->handler_type == 'empty') {
    $this->options['empty'] = TRUE;
  }
}