Commit e89abeb2 authored by alexpott's avatar alexpott

Issue #2778167 by Wim Leers, arunkumark: Build link in Statistics block with toRenderable()

parent 4c127e1a
......@@ -194,11 +194,7 @@ protected function nodeTitleList(array $nids, $title) {
$items = [];
foreach ($nids as $nid) {
$node = $this->entityRepository->getTranslationFromContext($nodes[$nid]);
$item = [
'#type' => 'link',
'#title' => $node->getTitle(),
'#url' => $node->urlInfo('canonical'),
];
$item = $node->toLink()->toRenderable();
$this->renderer->addCacheableDependency($item, $node);
$items[] = $item;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment