ContextDefinitionInterface.php 1010 B

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