summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Hojtsy2017-04-11 19:41:43 (GMT)
committerGabor Hojtsy2017-04-11 19:41:43 (GMT)
commit33aa003a146f159c3fb9d65d1d238febcc8157c4 (patch)
treecb68d5aceb8c55f0a384893d3c974fce4bc352eb
parentc8d1f0b157cb65dc01a4cc7bf475105054d29455 (diff)
Issue #2344045 by jhodgdon, EclipseGc, chx, CocoaBean, andrei.dincu, tim.plunkett, fago: ContextInterface needs documentation
-rw-r--r--core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php4
-rw-r--r--core/lib/Drupal/Component/Plugin/Context/ContextInterface.php9
-rw-r--r--core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php5
-rw-r--r--core/lib/Drupal/Core/Plugin/Context/ContextInterface.php5
4 files changed, 19 insertions, 4 deletions
diff --git a/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php b/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php
index a829cec..c18a704 100644
--- a/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php
+++ b/core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php
@@ -3,7 +3,9 @@
namespace Drupal\Component\Plugin\Context;
/**
- * Interface for context definitions.
+ * Interface used to define definition objects found in ContextInterface.
+ *
+ * @see \Drupal\Component\Plugin\Context\ContextInterface
*
* @todo WARNING: This interface is going to receive some additions as part of
* https://www.drupal.org/node/2346999.
diff --git a/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php b/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php
index 9b7134f..605c658 100644
--- a/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php
+++ b/core/lib/Drupal/Component/Plugin/Context/ContextInterface.php
@@ -3,7 +3,14 @@
namespace Drupal\Component\Plugin\Context;
/**
- * A generic context interface for wrapping data a plugin needs to operate.
+ * Provides data and definitions for plugins during runtime and administration.
+ *
+ * Plugin contexts are satisfied by ContextInterface implementing objects.
+ * These objects always contain a definition of what data they will provide
+ * during runtime. During run time, ContextInterface implementing objects must
+ * also provide the corresponding data value.
+ *
+ * @see \Drupal\Component\Plugin\Context\ContextDefinitionInterface
*/
interface ContextInterface {
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php
index 8cd0720..c60c6c7 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextDefinitionInterface.php
@@ -5,7 +5,10 @@ namespace Drupal\Core\Plugin\Context;
use Drupal\Component\Plugin\Context\ContextDefinitionInterface as ComponentContextDefinitionInterface;
/**
- * Interface for context definitions.
+ * Interface to define definition objects in ContextInterface via TypedData.
+ *
+ * @see \Drupal\Component\Plugin\Context\ContextDefinitionInterface
+ * @see \Drupal\Core\Plugin\Context\ContextInterface
*/
interface ContextDefinitionInterface extends ComponentContextDefinitionInterface {
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php b/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
index d126886..260cb2c 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextInterface.php
@@ -6,7 +6,10 @@ use Drupal\Component\Plugin\Context\ContextInterface as ComponentContextInterfac
use Drupal\Core\Cache\CacheableDependencyInterface;
/**
- * Interface for context.
+ * Context data and definitions for plugins supporting caching and return docs.
+ *
+ * @see \Drupal\Component\Plugin\Context\ContextInterface
+ * @see \Drupal\Core\Plugin\Context\ContextDefinitionInterface
*/
interface ContextInterface extends ComponentContextInterface, CacheableDependencyInterface {