Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
954f9111
Commit
954f9111
authored
Dec 03, 2013
by
Angie Byron
Browse files
Issue
#2147503
by amateescu: Remove stale reference to the EntityWrapper class.
parent
4b06b8bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Plugin/Context/Context.php
View file @
954f9111
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment