You are here

protected function ThunderGqlsRenderer::breadcrumb in Thunder 6.2.x

Generate the breadcrumb for current route.

Return value

array The breadcrumb.

1 call to ThunderGqlsRenderer::breadcrumb()
ThunderGqlsRenderer::renderResponse in modules/thunder_gqls/src/Render/MainContent/ThunderGqlsRenderer.php
Renders the main content render array into a response.

File

modules/thunder_gqls/src/Render/MainContent/ThunderGqlsRenderer.php, line 115

Class

ThunderGqlsRenderer
Thunder GraphQL Schema content renderer.

Namespace

Drupal\thunder_gqls\Render\MainContent

Code

protected function breadcrumb() : array {
  $breadCrumb = [];
  foreach ($this->breadcrumbManager
    ->build($this->currentRouteMatch
    ->getCurrentRouteMatch())
    ->getLinks() as $link) {
    $breadCrumb[] = [
      'uri' => $link
        ->getUrl()
        ->toUriString(),
      'title' => $link
        ->getText(),
    ];
  }
  return $breadCrumb;
}