You are here

public function EntityContextHandlerInterface::getContexts in Core Context 8

Returns all contexts attached to an entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

Return value

\Drupal\Component\Plugin\Context\ContextInterface[]

2 methods override EntityContextHandlerInterface::getContexts()
FieldContextHandler::getContexts in src/FieldContextHandler.php
Returns all contexts attached to an entity.
SettingsContextHandler::getContexts in src/SettingsContextHandler.php
Returns all contexts attached to an entity.

File

src/EntityContextHandlerInterface.php, line 20

Class

EntityContextHandlerInterface
Defines an interface for entity handlers that expose contexts.

Namespace

Drupal\core_context

Code

public function getContexts(EntityInterface $entity);