2f66fe9ef40c39e3fa1b49804ce48c391df4581d
[yaffs-website] / web / core / lib / Drupal / Core / Plugin / Context / ContextDefinitionInterface.php
1 <?php
2
3 namespace Drupal\Core\Plugin\Context;
4
5 use Drupal\Component\Plugin\Context\ContextDefinitionInterface as ComponentContextDefinitionInterface;
6
7 /**
8  * Interface to define definition objects in ContextInterface via TypedData.
9  *
10  * @see \Drupal\Component\Plugin\Context\ContextDefinitionInterface
11  * @see \Drupal\Core\Plugin\Context\ContextInterface
12  */
13 interface ContextDefinitionInterface extends ComponentContextDefinitionInterface {
14
15   /**
16    * Returns the data definition of the defined context.
17    *
18    * @return \Drupal\Core\TypedData\DataDefinitionInterface
19    *   The data definition object.
20    */
21   public function getDataDefinition();
22
23   /**
24    * Determines if this definition is satisfied by a context object.
25    *
26    * @param \Drupal\Core\Plugin\Context\ContextInterface $context
27    *   The context object.
28    *
29    * @return bool
30    *   TRUE if this definition is satisfiable by the context object, FALSE
31    *   otherwise.
32    */
33   public function isSatisfiedBy(ContextInterface $context);
34
35 }