public function EntityFormController::buildEntity

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

Overrides EntityFormControllerInterface::buildEntity

5 calls to EntityFormController::buildEntity()
2 methods override EntityFormController::buildEntity()
AccountFormController::buildEntity in drupal/core/modules/user/lib/Drupal/user/AccountFormController.php
Implements \Drupal\Core\Entity\EntityFormControllerInterface::buildEntity().
EntityFormControllerNG::buildEntity in drupal/core/lib/Drupal/Core/Entity/EntityFormControllerNG.php
Overrides EntityFormController::buildEntity().

File

drupal/core/lib/Drupal/Core/Entity/EntityFormController.php, line 392
Contains \Drupal\Core\Entity\EntityFormController.

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function buildEntity(array $form, array &$form_state) {
  $entity = clone $this->entity;

  // @todo Move entity_form_submit_build_entity() here.
  // @todo Exploit the Field API to process the submitted entity field.
  entity_form_submit_build_entity($entity
    ->entityType(), $entity, $form, $form_state);
  return $entity;
}