public function QuickEditFieldForm::submitForm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/quickedit/src/Form/QuickEditFieldForm.php \Drupal\quickedit\Form\QuickEditFieldForm::submitForm()
- 10 core/modules/quickedit/src/Form/QuickEditFieldForm.php \Drupal\quickedit\Form\QuickEditFieldForm::submitForm()
Saves the entity with updated values for the edited field.
Overrides FormInterface::submitForm
File
- core/
modules/ quickedit/ src/ Form/ QuickEditFieldForm.php, line 156
Class
- QuickEditFieldForm
- Builds and process a form for editing a single entity field.
Namespace
Drupal\quickedit\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$entity = $this
->buildEntity($form, $form_state);
$form_state
->set('entity', $entity);
// Store entity in tempstore with its UUID as tempstore key.
$this->tempStoreFactory
->get('quickedit')
->set($entity
->uuid(), $entity);
}