summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/TypedData.php
diff options
context:
space:
mode:
authorwebchick2014-09-28 21:09:08 (GMT)
committerwebchick2014-09-28 21:09:08 (GMT)
commit6caeaf03f3f224f0ae64804ca11ae1454498beb0 (patch)
tree5f7063bb1e3daad341a04a23ae6d5feb4d8dcb7c /core/lib/Drupal/Core/TypedData/TypedData.php
parente01fb4e948a9be3e04e970d6546a1847e597e532 (diff)
Issue #2002138 by yched, Jose Reyero, xjm, andypost, fago, msonnabaum, Berdir, dixon_: Use adapters for supporting typed data.
Diffstat (limited to 'core/lib/Drupal/Core/TypedData/TypedData.php')
-rw-r--r--core/lib/Drupal/Core/TypedData/TypedData.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/TypedData/TypedData.php b/core/lib/Drupal/Core/TypedData/TypedData.php
index 1ad3fb8..b0f614c 100644
--- a/core/lib/Drupal/Core/TypedData/TypedData.php
+++ b/core/lib/Drupal/Core/TypedData/TypedData.php
@@ -44,6 +44,13 @@ abstract class TypedData implements TypedDataInterface, PluginInspectionInterfac
protected $parent;
/**
+ * {@inheritdoc}
+ */
+ public static function createInstance($definition, $name = NULL, TypedDataInterface $parent = NULL) {
+ return new static($definition, $name, $parent);
+ }
+
+ /**
* Constructs a TypedData object given its definition and context.
*
* @param \Drupal\Core\TypedData\DataDefinitionInterface $definition