You are here

protected function AreaPluginBase::defineOptions in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/area/AreaPluginBase.php \Drupal\views\Plugin\views\area\AreaPluginBase::defineOptions()
  2. 9 core/modules/views/src/Plugin/views/area/AreaPluginBase.php \Drupal\views\Plugin\views\area\AreaPluginBase::defineOptions()
7 calls to AreaPluginBase::defineOptions()
DisplayLink::defineOptions in core/modules/views/src/Plugin/views/area/DisplayLink.php
HTTPStatusCode::defineOptions in core/modules/views/src/Plugin/views/area/HTTPStatusCode.php
Messages::defineOptions in core/modules/views/src/Plugin/views/area/Messages.php
Result::defineOptions in core/modules/views/src/Plugin/views/area/Result.php
Title::defineOptions in core/modules/views/src/Plugin/views/area/Title.php

... See full list

8 methods override AreaPluginBase::defineOptions()
DisplayLink::defineOptions in core/modules/views/src/Plugin/views/area/DisplayLink.php
HTTPStatusCode::defineOptions in core/modules/views/src/Plugin/views/area/HTTPStatusCode.php
Messages::defineOptions in core/modules/views/src/Plugin/views/area/Messages.php
Result::defineOptions in core/modules/views/src/Plugin/views/area/Result.php
TestExample::defineOptions in core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php

... See full list

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;
}