You are here

public function ContextReaction::getTitle in Breadcrumb Manager 8

Get title.

Parameters

string $path: The path.

\Symfony\Component\HttpFoundation\Request $request: The Request.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The Route match.

Return value

string The resolved title.

Overrides BreadcrumbTitleResolverInterface::getTitle

File

modules/breadcrumb_manager_context/src/Plugin/BreadcrumbTitleResolver/ContextReaction.php, line 104

Class

ContextReaction
Class ContextReaction.

Namespace

Drupal\breadcrumb_manager_context\Plugin\BreadcrumbTitleResolver

Code

public function getTitle($path, Request $request, RouteMatchInterface $route_match) {
  foreach ($this
    ->getReactions($path, $request) as $reaction) {
    $title = $reaction
      ->execute();
    if (!empty($title)) {
      return $title;
    }
  }
  return NULL;
}