public function SettingManager::getDefinitions in Express 8
Gets the definition of all plugins for this type.
Return value
mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.
Overrides PluginManager::getDefinitions
See also
\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()
File
- themes/
contrib/ bootstrap/ src/ Plugin/ SettingManager.php, line 33 - Contains \Drupal\bootstrap\Plugin\SettingManager.
Class
- SettingManager
- Manages discovery and instantiation of Bootstrap theme settings.
Namespace
Drupal\bootstrap\PluginCode
public function getDefinitions($sorted = TRUE) {
$definitions = parent::getDefinitions(FALSE);
if ($sorted) {
$groups = [];
foreach ($definitions as $plugin_id => $definition) {
$key = !empty($definition['groups']) ? implode(':', array_keys($definition['groups'])) : '_default';
$groups[$key][$plugin_id] = $definition;
}
ksort($groups);
$definitions = [];
foreach ($groups as $settings) {
uasort($settings, [
$this,
'sort',
]);
$definitions = array_merge($definitions, $settings);
}
}
return $definitions;
}