protected function EntityFormController::prepareEntity

Prepares the entity object before the form is built first.

1 call to EntityFormController::prepareEntity()
EntityFormController::init in drupal/core/lib/Drupal/Core/Entity/EntityFormController.php
Initialize the form state and the entity before the first form build.
2 methods override EntityFormController::prepareEntity()
NodeFormController::prepareEntity in drupal/core/modules/node/lib/Drupal/node/NodeFormController.php
Prepares the node object.
ViewFormControllerBase::prepareEntity in drupal/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php
Overrides Drupal\Core\Entity\EntityFormController::prepareForm().

File

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

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

protected function prepareEntity(EntityInterface $entity) {

  // @todo Perform common prepare operations and add a hook.
}