Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -8,6 +8,7 @@
|
|||
namespace Drupal\book;
|
||||
|
||||
use Drupal\Core\Access\AccessManagerInterface;
|
||||
use Drupal\Core\Breadcrumb\Breadcrumb;
|
||||
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
|
||||
use Drupal\Core\Entity\EntityManagerInterface;
|
||||
use Drupal\Core\Link;
|
||||
|
@ -72,6 +73,8 @@ class BookBreadcrumbBuilder implements BreadcrumbBuilderInterface {
|
|||
*/
|
||||
public function build(RouteMatchInterface $route_match) {
|
||||
$book_nids = array();
|
||||
$breadcrumb = new Breadcrumb();
|
||||
|
||||
$links = array(Link::createFromRoute($this->t('Home'), '<front>'));
|
||||
$book = $route_match->getParameter('node')->book;
|
||||
$depth = 1;
|
||||
|
@ -92,7 +95,9 @@ class BookBreadcrumbBuilder implements BreadcrumbBuilderInterface {
|
|||
$depth++;
|
||||
}
|
||||
}
|
||||
return $links;
|
||||
$breadcrumb->setLinks($links);
|
||||
$breadcrumb->setCacheContexts(['route.book_navigation']);
|
||||
return $breadcrumb;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue