public function VariantPluginDeleteBlockForm::submitForm in Page Manager 8
Same name and namespace in other branches
- 8.4 page_manager_ui/src/Form/VariantPluginDeleteBlockForm.php \Drupal\page_manager_ui\Form\VariantPluginDeleteBlockForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- page_manager_ui/
src/ Form/ VariantPluginDeleteBlockForm.php, line 93 - Contains \Drupal\page_manager_ui\Form\VariantPluginDeleteBlockForm.
Class
- VariantPluginDeleteBlockForm
- Provides a form for deleting an access condition.
Namespace
Drupal\page_manager_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->plugin
->removeBlock($this->block
->getConfiguration()['uuid']);
$cached_values = $this
->getTempstore()
->get($form_state
->getValue('block_display'));
$cached_values['plugin'] = $this->plugin;
$this
->getTempstore()
->set($form_state
->getValue('block_display'), $cached_values);
drupal_set_message($this
->t('The block %label has been removed.', [
'%label' => $this->block
->label(),
]));
}