QuickEditFieldForm::submitForm

public QuickEditFieldForm::submitForm(array &$form, FormStateInterface $form_state)

Saves the entity with updated values for the edited field.

Overrides FormInterface::submitForm

File

core/modules/quickedit/src/Form/QuickEditFieldForm.php, line 162

Class

QuickEditFieldForm
Builds and process a form for editing a single entity field.

Namespace

Drupal\quickedit\Form

Code

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);
}
doc_Drupal
2016-10-29 09:36:13
Comments
Leave a Comment

Please login to continue.