You are here

protected function FormModeManager::setFormModesToExclude in Form mode manager 8

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

Retrieve Form Mode Manager settings to format the exclusion list.

1 call to FormModeManager::setFormModesToExclude()
FormModeManager::__construct in src/FormModeManager.php
Constructs a FormDisplayManager object.

File

src/FormModeManager.php, line 277

Class

FormModeManager
FormDisplayManager service.

Namespace

Drupal\form_mode_manager

Code

protected function setFormModesToExclude() {
  $form_modes_to_exclude = [];
  $config = $this->configFactory
    ->get('form_mode_manager.settings')
    ->get('form_modes');
  $excluded_form_modes = isset($config) ? $config : [];
  foreach ($excluded_form_modes as $entity_type_id => $modes_excluded) {
    $form_modes_to_exclude[$entity_type_id][] = $modes_excluded;
  }
  $this->formModesExcluded = $form_modes_to_exclude;
}