Skip to content

Instantly share code, notes, and snippets.

@EclipseGc
Created May 20, 2014 05:58
Show Gist options
  • Save EclipseGc/71a4f78c2e4ac059ab7b to your computer and use it in GitHub Desktop.
Save EclipseGc/71a4f78c2e4ac059ab7b to your computer and use it in GitHub Desktop.
diff --git a/core/lib/Drupal/Core/Plugin/Context/Context.php b/core/lib/Drupal/Core/Plugin/Context/Context.php
index 2d79d6f..36314a3 100644
--- a/core/lib/Drupal/Core/Plugin/Context/Context.php
+++ b/core/lib/Drupal/Core/Plugin/Context/Context.php
@@ -51,6 +51,13 @@ public function setContextValue($value) {
parent::setContextValue($value);
}
+ /**
+ * @return DataDefinitionInterface
+ */
+ public function getContextDefinition() {
+ return new DataDefinition($this->contextDefinition);
+ }
+
/**
* Gets the context value as typed data object.
*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment