Mercurial > hg > isophonics-drupal-site
comparison core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
192 $nodes = $this->entityTypeManager->getStorage('node')->loadMultiple($nids); | 192 $nodes = $this->entityTypeManager->getStorage('node')->loadMultiple($nids); |
193 | 193 |
194 $items = []; | 194 $items = []; |
195 foreach ($nids as $nid) { | 195 foreach ($nids as $nid) { |
196 $node = $this->entityRepository->getTranslationFromContext($nodes[$nid]); | 196 $node = $this->entityRepository->getTranslationFromContext($nodes[$nid]); |
197 $item = [ | 197 $item = $node->toLink()->toRenderable(); |
198 '#type' => 'link', | |
199 '#title' => $node->getTitle(), | |
200 '#url' => $node->urlInfo('canonical'), | |
201 ]; | |
202 $this->renderer->addCacheableDependency($item, $node); | 198 $this->renderer->addCacheableDependency($item, $node); |
203 $items[] = $item; | 199 $items[] = $item; |
204 } | 200 } |
205 | 201 |
206 return [ | 202 return [ |