You are here

public function BreadcrumbManager::addBuilder in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php \Drupal\Core\Breadcrumb\BreadcrumbManager::addBuilder()

Adds another breadcrumb builder.

Parameters

\Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface $builder: The breadcrumb builder to add.

int $priority: Priority of the breadcrumb builder.

Overrides ChainBreadcrumbBuilderInterface::addBuilder

File

core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php, line 61
Contains \Drupal\Core\Breadcrumb\BreadcrumbManager.

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;
}