diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php index 14f98d0..6bdcda7 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLabel.php @@ -105,10 +105,9 @@ public function render($values) { return NULL; } - $uri = $entity->uri(); if (!empty($this->options['link_to_entity'])) { $this->options['alter']['make_link'] = TRUE; - $this->options['alter']['path'] = $uri['path']; + $this->options['alter']['path'] = $entity->uri()['path']; } return $this->sanitizeValue($entity->label()); @@ -120,13 +119,13 @@ public function render($values) { public function preRender(&$values) { parent::preRender($values); - $loads = array(); + $entity_ids = array(); foreach ($values as $value) { - $loads[$this->getValue($value, 'type')][] = $this->getValue($value); + $entity_ids[$this->getValue($value, 'type')][] = $this->getValue($value); } - foreach ($loads as $type => $ids) { - $this->loadedReferencers[$type] = $this->entityManager->getStorageController($type)->load($ids); + foreach ($entity_ids as $type => $ids) { + $this->loadedReferencers[$type] = $this->entityManager->getStorageController($type)->loadMultiple($ids); } }