public function EntityFormController::setFormDisplay

Sets the form display.

Sets the form display which will be used for populating form element defaults.

Parameters

\Drupal\entity\EntityFormDisplayInterface $form_display: The form display that the current form operates with.

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

Overrides EntityFormControllerInterface::setFormDisplay

1 call to EntityFormController::setFormDisplay()
EntityFormController::init in drupal/core/lib/Drupal/Core/Entity/EntityFormController.php
Initialize the form state and the entity before the first form build.

File

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

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function setFormDisplay(EntityFormDisplayInterface $form_display, array &$form_state) {
  $form_state['form_display'] = $form_display;
  return $this;
}