summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJibran Ijaz2019-02-10 10:21:40 (GMT)
committerJibran Ijaz2019-02-10 10:22:01 (GMT)
commitd94b508bc0285421fff309227c34e5a8e7918f69 (patch)
tree4593d12d02cc4872745146eb1a9f2b4af0667ca5
parent7850be9dbc1bddeb45edba7a846d5003abe852f1 (diff)
Issue #2723593 by jibran: Properly deprecate entity_load() and friendsHEAD8.x-1.x
-rw-r--r--src/Plugin/DataType/DynamicEntityReference.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Plugin/DataType/DynamicEntityReference.php b/src/Plugin/DataType/DynamicEntityReference.php
index 144bf26..249c662 100644
--- a/src/Plugin/DataType/DynamicEntityReference.php
+++ b/src/Plugin/DataType/DynamicEntityReference.php
@@ -50,7 +50,9 @@ class DynamicEntityReference extends EntityReference {
// DynamicEntityReferenceItem storage settings it is selected dynamically
// so it exists in DynamicEntityReferenceItem::values['target_type'].
$target_type = $this->parent->getValue()['target_type'];
- $entity = entity_load($target_type, $this->id);
+ $entity = \Drupal::entityTypeManager()
+ ->getStorage($target_type)
+ ->load($this->id);
$this->target = isset($entity) ? $entity->getTypedData() : NULL;
}
return $this->target;