You are here

public function FormModeManager::getFormModesByEntity in Form mode manager 8.2

Same name and namespace in other branches
  1. 8 src/FormModeManager.php \Drupal\form_mode_manager\FormModeManager::getFormModesByEntity()

Gets the entity form mode info for a specific entity type.

Parameters

string $entity_type_id: The entity type.

Return value

array An array contain all available form mode machine name.

Overrides FormModeManagerInterface::getFormModesByEntity

2 calls to FormModeManager::getFormModesByEntity()
FormModeManager::getActiveDisplaysByBundle in src/FormModeManager.php
Gets the entity form mode info for a specific bundle.
FormModeManager::getFormModesIdByEntity in src/FormModeManager.php
Gets all form modes id for a specific entity type.

File

src/FormModeManager.php, line 121

Class

FormModeManager
FormDisplayManager service.

Namespace

Drupal\form_mode_manager

Code

public function getFormModesByEntity($entity_type_id) {
  $form_modes = $this->entityDisplayRepository
    ->getFormModes($entity_type_id);
  $this
    ->filterExcludedFormModes($form_modes, $entity_type_id, FALSE);
  return $form_modes;
}