You are here

protected function FormModeManager::formModeIsExcluded in Form mode manager 8

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

Constructs a FormDisplayManager object.

Parameters

array $form_modes_to_exclude: Entity type manager service.

string $form_mode_id: Identifier of form mode prefixed by entity type id.

Return value

bool Determine if current form mode is excluded by configuration.

1 call to FormModeManager::formModeIsExcluded()
FormModeManager::filterExcludedFormModes in src/FormModeManager.php
Filter a form mode collection to exclude all desired form mode id.

File

src/FormModeManager.php, line 193

Class

FormModeManager
FormDisplayManager service.

Namespace

Drupal\form_mode_manager

Code

protected function formModeIsExcluded(array $form_modes_to_exclude, $form_mode_id) {
  return !empty($form_modes_to_exclude) && in_array($form_mode_id, $form_modes_to_exclude[0]['to_exclude']);
}