summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJibran Ijaz2019-02-10 10:21:40 (GMT)
committerJibran Ijaz2019-02-10 10:21:40 (GMT)
commit593b6947df6bb4981fee781d4080a31064450e59 (patch)
tree17ecf9cf16ac17062523f68ea66516600215016e
parentfd816b41289925bfd327bae9f276f64a5b9166e1 (diff)
Issue #2723593 by jibran: Properly deprecate entity_load() and friends8.x-2.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;