public function DeleteStyles::submitForm in Block Style Plugins 8.2
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
- src/
Form/ DeleteStyles.php, line 137
Class
- DeleteStyles
- Provides a form to delete a block style.
Namespace
Drupal\block_style_plugins\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$component = $this->sectionStorage
->getSection($this->delta)
->getComponent($this->uuid);
$component
->unsetThirdPartySetting('block_style_plugins', $this->pluginId);
$this->layoutTempstoreRepository
->set($this->sectionStorage);
$form_state
->setRedirectUrl($this->sectionStorage
->getLayoutBuilderUrl());
}