function AreaPluginBase::buildOptionsForm

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/area/AreaPluginBase.php \Drupal\views\Plugin\views\area\AreaPluginBase::buildOptionsForm()
  2. 10 core/modules/views/src/Plugin/views/area/AreaPluginBase.php \Drupal\views\Plugin\views\area\AreaPluginBase::buildOptionsForm()
  3. 11.x core/modules/views/src/Plugin/views/area/AreaPluginBase.php \Drupal\views\Plugin\views\area\AreaPluginBase::buildOptionsForm()

Overrides HandlerBase::buildOptionsForm

7 calls to AreaPluginBase::buildOptionsForm()
DisplayLink::buildOptionsForm in core/modules/views/src/Plugin/views/area/DisplayLink.php
Provide a form to edit options for this plugin.
HTTPStatusCode::buildOptionsForm in core/modules/views/src/Plugin/views/area/HTTPStatusCode.php
Provide a form to edit options for this plugin.
Result::buildOptionsForm in core/modules/views/src/Plugin/views/area/Result.php
Provide a form to edit options for this plugin.
TestExample::buildOptionsForm in core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php
Provide a form to edit options for this plugin.
Title::buildOptionsForm in core/modules/views/src/Plugin/views/area/Title.php
Provide a form to edit options for this plugin.

... See full list

7 methods override AreaPluginBase::buildOptionsForm()
DisplayLink::buildOptionsForm in core/modules/views/src/Plugin/views/area/DisplayLink.php
Provide a form to edit options for this plugin.
HTTPStatusCode::buildOptionsForm in core/modules/views/src/Plugin/views/area/HTTPStatusCode.php
Provide a form to edit options for this plugin.
Result::buildOptionsForm in core/modules/views/src/Plugin/views/area/Result.php
Provide a form to edit options for this plugin.
TestExample::buildOptionsForm in core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php
Provide a form to edit options for this plugin.
Title::buildOptionsForm in core/modules/views/src/Plugin/views/area/Title.php
Provide a form to edit options for this plugin.

... See full list

File

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

Class

AreaPluginBase
Base class for area handler plugins.

Namespace

Drupal\views\Plugin\views\area

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    if ($form_state->get('type') != 'empty') {
        $form['empty'] = [
            '#type' => 'checkbox',
            '#title' => $this->t('Display even if view has no result'),
            '#default_value' => isset($this->options['empty']) ? $this->options['empty'] : 0,
        ];
    }
}

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