public function AreaPluginBase::buildOptionsForm

Default options form that provides the label widget that all fields should have.

Overrides HandlerBase::buildOptionsForm

6 calls to AreaPluginBase::buildOptionsForm()
Result::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
Default options form that provides the label widget that all fields should have.
TestExample::buildOptionsForm in drupal/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/area/TestExample.php
Overrides Drupal\views\Plugin\views\area\AreaPluginBase::buildOptionsForm()
Text::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php
Default options form that provides the label widget that all fields should have.
TextCustom::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php
Default options form that provides the label widget that all fields should have.
Title::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Title.php
Overrides Drupal\views\Plugin\views\AreaPluginBase::buildOptionsForm().

... See full list

7 methods override AreaPluginBase::buildOptionsForm()
Broken::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php
Default options form that provides the label widget that all fields should have.
Result::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
Default options form that provides the label widget that all fields should have.
TestExample::buildOptionsForm in drupal/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Plugin/views/area/TestExample.php
Overrides Drupal\views\Plugin\views\area\AreaPluginBase::buildOptionsForm()
Text::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/Text.php
Default options form that provides the label widget that all fields should have.
TextCustom::buildOptionsForm in drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/TextCustom.php
Default options form that provides the label widget that all fields should have.

... See full list

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php, line 75
Definition of Drupal\views\Plugin\views\area\AreaPluginBase.

Class

AreaPluginBase
Base class for area handlers.

Namespace

Drupal\views\Plugin\views\area

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['label'] = array(
    '#type' => 'textfield',
    '#title' => t('Label'),
    '#default_value' => isset($this->options['label']) ? $this->options['label'] : '',
    '#description' => t('The label for this area that will be displayed only administratively.'),
  );
  if ($form_state['type'] != 'empty') {
    $form['empty'] = array(
      '#type' => 'checkbox',
      '#title' => t('Display even if view has no result'),
      '#default_value' => isset($this->options['empty']) ? $this->options['empty'] : 0,
    );
  }
}