interface BreadcrumbBuilderInterface

You are here

Defines an interface for classes that build breadcrumbs.

Namespace

Drupal\Core\Breadcrumb

Implemented by

Hierarchy

Expanded class hierarchy of BreadcrumbBuilderInterface

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
BreadcrumbBuilderInterface::applies public function Whether this breadcrumb builder should be used to build the breadcrumb.
BreadcrumbBuilderInterface::build public function Builds the breadcrumb.

File

core/lib/Drupal/Core/Breadcrumb/BreadcrumbBuilderInterface.php, line 13
Contains \Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface.

View source
interface BreadcrumbBuilderInterface {

  /**
   * Whether this breadcrumb builder should be used to build the breadcrumb.
   *
   * @param array $attributes
   *   Attributes representing the current page.
   *
   * @return bool
   *   TRUE if this builder should be used or FALSE to let other builders
   *   decide.
   */
  public function applies(array $attributes);

  /**
   * Builds the breadcrumb.
   *
   * @param array $attributes
   *   Attributes representing the current page.
   *
   * @return array
   *   An array of HTML links for the breadcrumb. Returning an empty array will
   *   suppress all breadcrumbs.
   */
  public function build(array $attributes);

}