function LayoutBuilderEntityFormTrait::saveTasks
Same name in other branches
- 10 core/modules/layout_builder/src/Form/LayoutBuilderEntityFormTrait.php \Drupal\layout_builder\Form\LayoutBuilderEntityFormTrait::saveTasks()
Performs tasks that are needed during the save process.
Parameters
\Drupal\Core\Form\FormStateInterface $formState: The form state.
\Drupal\Core\StringTranslation\TranslatableMarkup $message: The message to display.
3 calls to LayoutBuilderEntityFormTrait::saveTasks()
- DefaultsEntityForm::save in core/
modules/ layout_builder/ src/ Form/ DefaultsEntityForm.php - Form submission handler for the 'save' action.
- LayoutForm::submitForm in core/
modules/ navigation/ src/ Form/ LayoutForm.php - Form submission handler.
- OverridesEntityForm::save in core/
modules/ layout_builder/ src/ Form/ OverridesEntityForm.php - Form submission handler for the 'save' action.
File
-
core/
modules/ layout_builder/ src/ Form/ LayoutBuilderEntityFormTrait.php, line 103
Class
- LayoutBuilderEntityFormTrait
- Provides a trait for common methods used in Layout Builder entity forms.
Namespace
Drupal\layout_builder\FormCode
protected function saveTasks(FormStateInterface $formState, TranslatableMarkup $message) : void {
$this->layoutTempstoreRepository
->delete($this->getSectionStorage());
$this->messenger()
->addStatus($message);
$formState->setRedirectUrl($this->getSectionStorage()
->getRedirectUrl());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.