You are here

public function ViewsBlockBase::blockSubmit in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::blockSubmit()

Overrides BlockPluginTrait::blockSubmit

1 call to ViewsBlockBase::blockSubmit()
ViewsBlock::blockSubmit in core/modules/views/src/Plugin/Block/ViewsBlock.php
1 method overrides ViewsBlockBase::blockSubmit()
ViewsBlock::blockSubmit in core/modules/views/src/Plugin/Block/ViewsBlock.php

File

core/modules/views/src/Plugin/Block/ViewsBlockBase.php, line 182

Class

ViewsBlockBase
Base class for Views block plugins.

Namespace

Drupal\views\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  if (!$form_state
    ->isValueEmpty('views_label_checkbox')) {
    $this->configuration['views_label'] = $form_state
      ->getValue('views_label');
  }
  else {
    $this->configuration['views_label'] = '';
  }
  $form_state
    ->unsetValue('views_label_checkbox');
}