function Title::buildOptionsForm

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

Overrides AreaPluginBase::buildOptionsForm

File

core/modules/views/src/Plugin/views/area/Title.php, line 28

Class

Title
Views area title override handler.

Namespace

Drupal\views\Plugin\views\area

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $form['title'] = [
        '#type' => 'textfield',
        '#title' => $this->t('Overridden title'),
        '#default_value' => $this->options['title'],
        '#description' => $this->t('Override the title of this view when it is empty. The available global tokens below can be used here.'),
    ];
    // Don't use the AreaPluginBase tokenForm method, we don't want row tokens.
    $this->globalTokenForm($form, $form_state);
}

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