Commit af6987f9 authored by Octavian Belu's avatar Octavian Belu Committed by Greg Boggs
Browse files

Issue #3254436 by tavib47, omkar-pd, marcoscano, szloredan, Seppe Beelprez,...

Issue #3254436 by tavib47, omkar-pd, marcoscano, szloredan, Seppe Beelprez, Greg Boggs, joakland: Alternative title not working
parent 32d64bca
Loading
Loading
Loading
Loading
+4 −2
Changes for src/EasyBreadcrumbBuilder.php: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -487,9 +487,11 @@ class EasyBreadcrumbBuilder implements BreadcrumbBuilderInterface {
                if (isset($options['type']) && strpos($options['type'], 'entity:') === 0) {
                  $entity = $route_match->getParameter($name);
                  if ($entity instanceof EntityInterface && $entity->hasLinkTemplate('canonical')) {
                    $title = $entity->label();
                    $title = $this->normalizeText($this->getTitleString($route_request, $route_match, $replacedTitles));
                    // Add this entity's cacheability metadata.
                    $breadcrumb->addCacheableDependency($entity);
                    // If the title is to be replaced replaces the title.
                    if (!empty($title) && array_key_exists((string) $title, $replacedTitles)) {
                    if (!empty($title) && array_key_exists($title, $replacedTitles)) {
                      $title = $replacedTitles[(string) $title];
                    }
                    if ($title && $this->config->get(EasyBreadcrumbConstants::TRUNCATOR_MODE)) {