Skip to content
Snippets Groups Projects
Commit 84e302e0 authored by Alex Pott's avatar Alex Pott Committed by catch
Browse files

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

(cherry picked from commit e89abeb2)
parent f5f08960
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment