Commit 954f9111 authored by webchick's avatar webchick

Issue #2147503 by amateescu: Remove stale reference to the EntityWrapper class.

parent 4b06b8bd
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment