public function ViewsBlockBase::blockSubmit in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/Block/ViewsBlockBase.php \Drupal\views\Plugin\Block\ViewsBlockBase::blockSubmit()
Adds block type-specific submission handling for the block form.
Note that this method takes the form structure and form state for the full block configuration form as arguments, not just the elements defined in BlockPluginInterface::blockForm().
Parameters
array $form: The form definition array for the full block configuration form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides BlockBase::blockSubmit
See also
\Drupal\Core\Block\BlockPluginInterface::blockForm()
\Drupal\Core\Block\BlockPluginInterface::blockValidate()
1 call to ViewsBlockBase::blockSubmit()
- ViewsBlock::blockSubmit in core/
modules/ views/ src/ Plugin/ Block/ ViewsBlock.php - Adds block type-specific submission handling for the block form.
1 method overrides ViewsBlockBase::blockSubmit()
- ViewsBlock::blockSubmit in core/
modules/ views/ src/ Plugin/ Block/ ViewsBlock.php - Adds block type-specific submission handling for the block form.
File
- core/
modules/ views/ src/ Plugin/ Block/ ViewsBlockBase.php, line 174 - Contains \Drupal\views\Plugin\Block\ViewsBlockBase.
Class
- ViewsBlockBase
- Base class for Views block plugins.
Namespace
Drupal\views\Plugin\BlockCode
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');
}