You are here

public function EditableFieldsHelper::getFormDisplay in Editable Fields 1.0.x

Same name and namespace in other branches
  1. 8 src/services/EditableFieldsHelper.php \Drupal\editablefields\services\EditableFieldsHelper::getFormDisplay()

Loads entity form display.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: Entity object.

$form_mode: Form mode.

Return value

\Drupal\Core\Entity\Display\EntityFormDisplayInterface|NULL

Overrides EditableFieldsHelperInterface::getFormDisplay

File

src/services/EditableFieldsHelper.php, line 114

Class

EditableFieldsHelper
Class EditableFieldsHelper.

Namespace

Drupal\editablefields\services

Code

public function getFormDisplay(EntityInterface $entity, $form_mode) {
  return $this->entityDisplayRepository
    ->getFormDisplay($entity
    ->getEntityTypeId(), $entity
    ->bundle(), $form_mode);
}