You are here

private function FormModeManager::getEntityFormDisplayIds in Form mode manager 8.2

Build an array with ids to load for active display.

Parameters

array $ids: Associative array with entity_form_display ids to load.

Return value

array An array with entity_form_display ids to load.

1 call to FormModeManager::getEntityFormDisplayIds()
FormModeManager::getActiveDisplays in src/FormModeManager.php
Returns entity (form) displays for the current entity display type.

File

src/FormModeManager.php, line 365

Class

FormModeManager
FormDisplayManager service.

Namespace

Drupal\form_mode_manager

Code

private function getEntityFormDisplayIds(array $ids) {
  $load_ids = [];
  for ($index = 0; count($ids) > $index; $index++) {
    $config_id = str_replace(self::ENTITY_FORM_DISPLAY_CONFIG_PREFIX . '.', '', $ids[$index]);
    list(, , $form_mode_name) = explode('.', $config_id);
    if ($form_mode_name !== 'default') {
      $load_ids[] = $config_id;
    }
  }
  return $load_ids;
}