public function TranslateBlockForm::submitForm in Layout Builder Symmetric Translations 8
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/ TranslateBlockForm.php, line 200
Class
- TranslateBlockForm
- Provides a form to translate a block plugin in the Layout Builder.
Namespace
Drupal\layout_builder_st\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$section_storage = $this->sectionStorage;
$section_storage
->setTranslatedComponentConfiguration($this->uuid, $form_state
->getValue('translation'));
$this->layoutTempstoreRepository
->set($this->sectionStorage);
$form_state
->setRedirectUrl($this->sectionStorage
->getLayoutBuilderUrl());
}