You are here

interface EntityContextHandlerInterface in Core Context 8

Defines an interface for entity handlers that expose contexts.

Hierarchy

Expanded class hierarchy of EntityContextHandlerInterface

All classes that implement EntityContextHandlerInterface

File

src/EntityContextHandlerInterface.php, line 11

Namespace

Drupal\core_context
View 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

Namesort descending Modifiers Type Description Overrides
EntityContextHandlerInterface::getContexts public function Returns all contexts attached to an entity. 2
EntityHandlerInterface::createInstance public static function Instantiates a new instance of this entity handler. 13