public function EntityFormController::form

Returns the actual form array to be built.

See also

Drupal\Core\Entity\EntityFormController::build()

11 calls to EntityFormController::form()
14 methods override EntityFormController::form()
AccountFormController::form in drupal/core/modules/user/lib/Drupal/user/AccountFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().
CategoryFormController::form in drupal/core/modules/contact/lib/Drupal/contact/CategoryFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().
CommentFormController::form in drupal/core/modules/comment/lib/Drupal/comment/CommentFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().
ConfigTestFormController::form in drupal/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().
EntityFormControllerNG::form in drupal/core/lib/Drupal/Core/Entity/EntityFormControllerNG.php
Overrides EntityFormController::form().

... See full list

File

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

Class

EntityFormController
Base class for entity form controllers.

Namespace

Drupal\Core\Entity

Code

public function form(array $form, array &$form_state, EntityInterface $entity) {

  // @todo Exploit the Field API to generate the default widgets for the
  // entity properties.
  $info = $entity
    ->entityInfo();
  if (!empty($info['fieldable'])) {
    field_attach_form($entity
      ->entityType(), $entity, $form, $form_state, $this
      ->getFormLangcode($form_state));
  }
  return $form;
}