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

12 calls to EntityFormController::submit()
ActionFormControllerBase::submit in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Implements \Drupal\Core\Entity\EntityFormControllerInterface::submit().
BlockFormController::submit in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().
CommentFormController::submit in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
CustomBlockFormController::submit in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().
EntityTestFormController::submit in drupal/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().

... See full list

13 methods override EntityFormController::submit()
ActionFormControllerBase::submit in drupal/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
Implements \Drupal\Core\Entity\EntityFormControllerInterface::submit().
BlockFormController::submit in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().
CommentFormController::submit in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
CustomBlockFormController::submit in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().
EntityTestFormController::submit in drupal/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::submit().

... See full list

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 273
Contains \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) {

  // Remove button and internal Form API values from submitted values.
  form_state_values_clean($form_state);
  $this
    ->updateFormLangcode($form_state);
  $this
    ->submitEntityLanguage($form, $form_state);
  $this->entity = $this
    ->buildEntity($form, $form_state);
  return $this->entity;
}