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.
3 methods override EntityFormController::prepareEntity()
CustomBlockFormController::prepareEntity in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockFormController.php
Overrides \Drupal\Core\Entity\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_ui/lib/Drupal/views_ui/ViewFormControllerBase.php
Overrides Drupal\Core\Entity\EntityFormController::prepareForm().

File

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

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

protected function prepareEntity() {

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