protected function InstallablePluginManager::sortDefinitions in Markdown 8.2
Sorts a definitions array.
This sorts the definitions array first by the weight column, and then by the plugin label, ensuring a stable, deterministic, and testable ordering of plugins.
Parameters
array $definitions: The definitions array to sort.
array $properties: Optional. The properties to sort by.
2 calls to InstallablePluginManager::sortDefinitions()
- InstallablePluginManager::getRuntimeDefinitions in src/
PluginManager/ InstallablePluginManager.php - Retrieves the runtime definitions.
- InstallablePluginManager::processDefinition in src/
PluginManager/ InstallablePluginManager.php - Performs extra processing on plugin definitions.
File
- src/
PluginManager/ InstallablePluginManager.php, line 686
Class
- InstallablePluginManager
- Installable Plugin Manager.
Namespace
Drupal\markdown\PluginManagerCode
protected function sortDefinitions(array &$definitions, array $properties = [
'weight',
'label',
]) {
SortArray::multisortProperties($definitions, $properties);
}