BreadcrumbBuilderInterface.php 841 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Drupal\Core\Breadcrumb;
  3. use Drupal\Core\Routing\RouteMatchInterface;
  4. /**
  5. * Defines an interface for classes that build breadcrumbs.
  6. */
  7. interface BreadcrumbBuilderInterface {
  8. /**
  9. * Whether this breadcrumb builder should be used to build the breadcrumb.
  10. *
  11. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
  12. * The current route match.
  13. *
  14. * @return bool
  15. * TRUE if this builder should be used or FALSE to let other builders
  16. * decide.
  17. */
  18. public function applies(RouteMatchInterface $route_match);
  19. /**
  20. * Builds the breadcrumb.
  21. *
  22. * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
  23. * The current route match.
  24. *
  25. * @return \Drupal\Core\Breadcrumb\Breadcrumb
  26. * A breadcrumb.
  27. */
  28. public function build(RouteMatchInterface $route_match);
  29. }