public function LocalTaskManager::getDefinitions in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Menu/LocalTaskManager.php \Drupal\Core\Menu\LocalTaskManager::getDefinitions()
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 DefaultPluginManager::getDefinitions
1 call to LocalTaskManager::getDefinitions()
- LocalTaskManager::getLocalTasksForRoute in core/
lib/ Drupal/ Core/ Menu/ LocalTaskManager.php - Find all local tasks that appear on a named route.
File
- core/
lib/ Drupal/ Core/ Menu/ LocalTaskManager.php, line 185 - Contains \Drupal\Core\Menu\LocalTaskManager.
Class
- LocalTaskManager
- Provides the default local task manager using YML as primary definition.
Namespace
Drupal\Core\MenuCode
public function getDefinitions() {
$definitions = parent::getDefinitions();
$count = 0;
foreach ($definitions as &$definition) {
if (isset($definition['weight'])) {
// Add some micro weight.
$definition['weight'] += $count++ * 1.0E-6;
}
}
return $definitions;
}