function ViewsBlockBase::blockSubmit

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::blockSubmit()
  2. 10 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::blockSubmit()
  3. 11.x 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');
}

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