You are here

public function EntityForm::form in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::form()
  2. 10 core/lib/Drupal/Core/Entity/EntityForm.php \Drupal\Core\Entity\EntityForm::form()

Gets the actual form array to be built.

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

31 calls to EntityForm::form()
ActionFormBase::form in core/modules/action/src/Form/ActionFormBase.php
Gets the actual form array to be built.
BlockContentTypeForm::form in core/modules/block_content/src/BlockContentTypeForm.php
Gets the actual form array to be built.
CommentTypeForm::form in core/modules/comment/src/CommentTypeForm.php
Gets the actual form array to be built.
ConfigTestForm::form in core/modules/config/tests/config_test/src/ConfigTestForm.php
Gets the actual form array to be built.
ContactFormEditForm::form in core/modules/contact/src/ContactFormEditForm.php
Gets the actual form array to be built.

... See full list

36 methods override EntityForm::form()
ActionFormBase::form in core/modules/action/src/Form/ActionFormBase.php
Gets the actual form array to be built.
BlockContentTypeForm::form in core/modules/block_content/src/BlockContentTypeForm.php
Gets the actual form array to be built.
BlockForm::form in core/modules/block/src/BlockForm.php
Gets the actual form array to be built.
CommentTypeForm::form in core/modules/comment/src/CommentTypeForm.php
Gets the actual form array to be built.
ConfigTestForm::form in core/modules/config/tests/config_test/src/ConfigTestForm.php
Gets the actual form array to be built.

... See full list

File

core/lib/Drupal/Core/Entity/EntityForm.php, line 181

Class

EntityForm
Base class for entity forms.

Namespace

Drupal\Core\Entity

Code

public function form(array $form, FormStateInterface $form_state) {

  // Add #process and #after_build callbacks.
  $form['#process'][] = '::processForm';
  $form['#after_build'][] = '::afterBuild';
  return $form;
}