interface EntityContextHandlerInterface in Core Context 8
Defines an interface for entity handlers that expose contexts.
Hierarchy
- interface \Drupal\Core\Entity\EntityHandlerInterface
- interface \Drupal\core_context\EntityContextHandlerInterface
Expanded class hierarchy of EntityContextHandlerInterface
All classes that implement EntityContextHandlerInterface
File
- src/
EntityContextHandlerInterface.php, line 11
Namespace
Drupal\core_contextView source
interface EntityContextHandlerInterface extends EntityHandlerInterface {
/**
* Returns all contexts attached to an entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
*
* @return \Drupal\Component\Plugin\Context\ContextInterface[]
*/
public function getContexts(EntityInterface $entity);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityContextHandlerInterface:: |
public | function | Returns all contexts attached to an entity. | 2 |
EntityHandlerInterface:: |
public static | function | Instantiates a new instance of this entity handler. | 13 |