public function ActionEditFieldForm::submitForm in Paragraphs table 8
Saves the entity with updated values for the edited field.
Overrides FormInterface::submitForm
File
- src/
Form/ ActionEditFieldForm.php, line 136
Class
- ActionEditFieldForm
- Builds and process a form for editing a single entity field.
Namespace
Drupal\paragraphs_table\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$entity = $this
->buildEntity($form, $form_state);
$form_state
->set('entity', $entity);
if ($entity
->getEntityType()
->hasKey('revision')) {
$entity
->setNewRevision(FALSE);
}
$entity
->save();
$form_state
->disableRedirect(FALSE);
$form_state
->setRedirectUrl(Url::fromRoute('<current>'));
}