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

Gets the form entity.

The form entity which has been used for populating form element defaults.

Return value

\Drupal\Core\Entity\EntityInterface The current form entity.

Overrides EntityFormInterface::getEntity

9 calls to EntityForm::getEntity()
BundleEntityFormBase::protectBundleIdElement in core/lib/Drupal/Core/Entity/BundleEntityFormBase.php
Protects the bundle entity's ID property's form element against changes.
WorkflowStateAddForm::exists in core/modules/workflows/src/Form/WorkflowStateAddForm.php
Determines if the workflow state already exists.
WorkflowStateAddForm::form in core/modules/workflows/src/Form/WorkflowStateAddForm.php
Gets the actual form array to be built.
WorkflowStateEditForm::form in core/modules/workflows/src/Form/WorkflowStateEditForm.php
Gets the actual form array to be built.
WorkflowTransitionAddForm::exists in core/modules/workflows/src/Form/WorkflowTransitionAddForm.php
Determines if the workflow transition already exists.

... See full list

File

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

Class

EntityForm
Base class for entity forms.

Namespace

Drupal\Core\Entity

Code

public function getEntity() {
  return $this->entity;
}