public function EntityFormController::submit

Implements Drupal\Core\Entity\EntityFormControllerInterface::submit().

This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be passed to the following submit handlers. At this point of the form workflow the entity is validated and the form state can be updated, this way the subsequently invoked handlers can retrieve a regular entity object to act on.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: A reference to a keyed array containing the current state of the form.

Overrides EntityFormControllerInterface::submit

8 calls to EntityFormController::submit()
CommentFormController::submit in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
NodeFormController::submit in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Updates the node object by processing the submitted values.
ProfileFormController::submit in drupal/core/modules/user/lib/Drupal/user/ProfileFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
RegisterFormController::submit in drupal/core/modules/user/lib/Drupal/user/RegisterFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
TermFormController::submit in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().

... See full list

9 methods override EntityFormController::submit()
CommentFormController::submit in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
NodeFormController::submit in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Updates the node object by processing the submitted values.
ProfileFormController::submit in drupal/core/modules/user/lib/Drupal/user/ProfileFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
RegisterFormController::submit in drupal/core/modules/user/lib/Drupal/user/RegisterFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
TermFormController::submit in drupal/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().

... See full list

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 186
Definition of Drupal\Core\Entity\EntityFormController.

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function submit(array $form, array &$form_state) {
  $this
    ->submitEntityLanguage($form, $form_state);
  $entity = $this
    ->buildEntity($form, $form_state);
  $this
    ->setEntity($entity, $form_state);
  return $entity;
}