public function EntityFormControllerInterface::buildEntity

Builds an updated entity object based upon the submitted form values.

For building the updated entity object the form's entity is cloned and the submitted form values are copied to entity properties. The form's entity remains unchanged.

Parameters

array $form: A nested array form elements comprising the form.

array $form_state: An associative array containing the current state of the form.

Return value

\Drupal\Core\Entity\EntityInterface An updated copy of the form's entity object.

See also

\Drupal\Core\Entity\EntityFormControllerInterface::getEntity()

1 method overrides EntityFormControllerInterface::buildEntity()

File

drupal/core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php, line 116
Contains \Drupal\Core\Entity\EntityFormControllerInterface.

Class

EntityFormControllerInterface
Defines a common interface for entity form controller classes.

Namespace

Drupal\Core\Entity

Code

public function buildEntity(array $form, array &$form_state);