From 954f911129f8e54dcce803b126d7116dce808a73 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Tue, 3 Dec 2013 11:46:21 -0800
Subject: [PATCH] Issue #2147503 by amateescu: Remove stale reference to the
 EntityWrapper class.

---
 core/lib/Drupal/Core/Plugin/Context/Context.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/core/lib/Drupal/Core/Plugin/Context/Context.php b/core/lib/Drupal/Core/Plugin/Context/Context.php
index fbdf65812f70..daa98292489e 100644
--- a/core/lib/Drupal/Core/Plugin/Context/Context.php
+++ b/core/lib/Drupal/Core/Plugin/Context/Context.php
@@ -8,12 +8,9 @@
 namespace Drupal\Core\Plugin\Context;
 
 use Drupal\Component\Plugin\Context\Context as ComponentContext;
-use Drupal\Core\Entity\Plugin\DataType\EntityWrapper;
 use Drupal\Core\TypedData\ComplexDataInterface;
 use Drupal\Core\TypedData\ListInterface;
 use Drupal\Core\TypedData\TypedDataInterface;
-use Drupal\Core\Validation\DrupalTranslator;
-use Symfony\Component\Validator\Validation;
 
 /**
  * A Drupal specific context wrapper class.
@@ -36,8 +33,7 @@ public function getContextValue() {
     if (!$is_complex && $typed_value instanceof ListInterface) {
       $is_complex = $typed_value[0] instanceof ComplexDataInterface;
     }
-    // @todo We won't need the getType == entity check once #1868004 lands.
-    if ($typed_value instanceof TypedDataInterface && (!$is_complex || $typed_value instanceof EntityWrapper)) {
+    if ($typed_value instanceof TypedDataInterface && !$is_complex) {
       return $typed_value->getValue();
     }
     return $typed_value;
-- 
GitLab