Commit 33aa003a authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2344045 by jhodgdon, EclipseGc, chx, CocoaBean, andrei.dincu,...

Issue #2344045 by jhodgdon, EclipseGc, chx, CocoaBean, andrei.dincu, tim.plunkett, fago: ContextInterface needs documentation
parent c8d1f0b1
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
namespace Drupal\Component\Plugin\Context; 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 * @todo WARNING: This interface is going to receive some additions as part of
* https://www.drupal.org/node/2346999. * https://www.drupal.org/node/2346999.
......
...@@ -3,7 +3,14 @@ ...@@ -3,7 +3,14 @@
namespace Drupal\Component\Plugin\Context; 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 { interface ContextInterface {
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
use Drupal\Component\Plugin\Context\ContextDefinitionInterface as ComponentContextDefinitionInterface; 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 { interface ContextDefinitionInterface extends ComponentContextDefinitionInterface {
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
use Drupal\Core\Cache\CacheableDependencyInterface; 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 { interface ContextInterface extends ComponentContextInterface, CacheableDependencyInterface {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment