You are here

public function QuickEditFieldForm::submitForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 167
Contains \Drupal\quickedit\Form\QuickEditFieldForm.

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);
}