EntityContextHandlerInterface.php in Core Context 8
Namespace
Drupal\core_contextFile
src/EntityContextHandlerInterface.phpView source
<?php
namespace Drupal\core_context;
use Drupal\Core\Entity\EntityHandlerInterface;
use Drupal\Core\Entity\EntityInterface;
/**
* Defines an interface for entity handlers that expose contexts.
*/
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);
}
Interfaces
Name | Description |
---|---|
EntityContextHandlerInterface | Defines an interface for entity handlers that expose contexts. |