function AreaPluginBase::defineOptions

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/area/AreaPluginBase.php \Drupal\views\Plugin\views\area\AreaPluginBase::defineOptions()
1 method overrides AreaPluginBase::defineOptions()
TokenizeAreaPluginBase::defineOptions in core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php
Information about options for all kinds of purposes will be held here.

File

core/modules/views/src/Plugin/views/area/AreaPluginBase.php, line 59

Class

AreaPluginBase
Base class for area handler plugins.

Namespace

Drupal\views\Plugin\views\area

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $this->definition['field'] = !empty($this->definition['field']) ? $this->definition['field'] : '';
  $label = !empty($this->definition['label']) ? $this->definition['label'] : $this->definition['field'];
  $options['admin_label']['default'] = $label;
  $options['empty'] = [
    'default' => FALSE,
  ];
  return $options;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.