protected function BreadcrumbManager::getSortedBuilders in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php \Drupal\Core\Breadcrumb\BreadcrumbManager::getSortedBuilders()
Returns the sorted array of breadcrumb builders.
Return value
\Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface[] An array of breadcrumb builder objects.
1 call to BreadcrumbManager::getSortedBuilders()
- BreadcrumbManager::build in core/
lib/ Drupal/ Core/ Breadcrumb/ BreadcrumbManager.php - Builds the breadcrumb.
File
- core/
lib/ Drupal/ Core/ Breadcrumb/ BreadcrumbManager.php, line 105
Class
- BreadcrumbManager
- Provides a breadcrumb manager.
Namespace
Drupal\Core\BreadcrumbCode
protected function getSortedBuilders() {
if (!isset($this->sortedBuilders)) {
// Sort the builders according to priority.
krsort($this->builders);
// Merge nested builders from $this->builders into $this->sortedBuilders.
$this->sortedBuilders = [];
foreach ($this->builders as $builders) {
$this->sortedBuilders = array_merge($this->sortedBuilders, $builders);
}
}
return $this->sortedBuilders;
}