function public static function SettingManager::getTopLevelGroupIndex

8.x-3.x SettingManager.php public static SettingManager::getTopLevelGroupIndex(array $definition)

Retrieves the index of the top level group.

Parameters

array $definition: A plugin definition.

Return value

int The array index of the top level group.

Class

SettingManager
Manages discovery and instantiation of Bootstrap theme settings.

Namespace

Drupal\bootstrap\Plugin

Source src/Plugin/SettingManager.php (line 99)

public static function getTopLevelGroupIndex(array $definition) {
  $groups = !empty($definition['groups']) ? array_keys($definition['groups']) : [];
  $index = array_search(reset($groups), static::$groupOrder);
  if ($index === FALSE) {
    $index = -1;
  }
  return $index;
}