Skip to content
Snippets Groups Projects
Commit 954f9111 authored by Angie Byron's avatar Angie Byron
Browse files

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

parent 4b06b8bd
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -8,12 +8,9 @@ ...@@ -8,12 +8,9 @@
namespace Drupal\Core\Plugin\Context; namespace Drupal\Core\Plugin\Context;
use Drupal\Component\Plugin\Context\Context as ComponentContext; use Drupal\Component\Plugin\Context\Context as ComponentContext;
use Drupal\Core\Entity\Plugin\DataType\EntityWrapper;
use Drupal\Core\TypedData\ComplexDataInterface; use Drupal\Core\TypedData\ComplexDataInterface;
use Drupal\Core\TypedData\ListInterface; use Drupal\Core\TypedData\ListInterface;
use Drupal\Core\TypedData\TypedDataInterface; use Drupal\Core\TypedData\TypedDataInterface;
use Drupal\Core\Validation\DrupalTranslator;
use Symfony\Component\Validator\Validation;
/** /**
* A Drupal specific context wrapper class. * A Drupal specific context wrapper class.
...@@ -36,8 +33,7 @@ public function getContextValue() { ...@@ -36,8 +33,7 @@ public function getContextValue() {
if (!$is_complex && $typed_value instanceof ListInterface) { if (!$is_complex && $typed_value instanceof ListInterface) {
$is_complex = $typed_value[0] instanceof ComplexDataInterface; $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) {
if ($typed_value instanceof TypedDataInterface && (!$is_complex || $typed_value instanceof EntityWrapper)) {
return $typed_value->getValue(); return $typed_value->getValue();
} }
return $typed_value; return $typed_value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment