function BreadcrumbManager::addBuilder

Same name in other branches
  1. 9 core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php \Drupal\Core\Breadcrumb\BreadcrumbManager::addBuilder()
  2. 10 core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php \Drupal\Core\Breadcrumb\BreadcrumbManager::addBuilder()
  3. 11.x core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php \Drupal\Core\Breadcrumb\BreadcrumbManager::addBuilder()

Overrides ChainBreadcrumbBuilderInterface::addBuilder

File

core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php, line 56

Class

BreadcrumbManager
Provides a breadcrumb manager.

Namespace

Drupal\Core\Breadcrumb

Code

public function addBuilder(BreadcrumbBuilderInterface $builder, $priority) {
    $this->builders[$priority][] = $builder;
    // Force the builders to be re-sorted.
    $this->sortedBuilders = NULL;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.