comparison core/modules/system/src/PathBasedBreadcrumbBuilder.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
142 $breadcrumb = new Breadcrumb(); 142 $breadcrumb = new Breadcrumb();
143 $links = []; 143 $links = [];
144 144
145 // Add the url.path.parent cache context. This code ignores the last path 145 // Add the url.path.parent cache context. This code ignores the last path
146 // part so the result only depends on the path parents. 146 // part so the result only depends on the path parents.
147 $breadcrumb->addCacheContexts(['url.path.parent']); 147 $breadcrumb->addCacheContexts(['url.path.parent', 'url.path.is_front']);
148 148
149 // Do not display a breadcrumb on the frontpage. 149 // Do not display a breadcrumb on the frontpage.
150 if ($this->pathMatcher->isFrontPage()) { 150 if ($this->pathMatcher->isFrontPage()) {
151 return $breadcrumb; 151 return $breadcrumb;
152 } 152 }