You are here

public function SubscribersInterface::getBasicContext in Message Subscribe 8

Get context from a given entity type.

This is a naive implementation, which extracts context from an entity. For example, given a node we extract the node author and related taxonomy terms.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity object.

bool $skip_detailed_context: (optional) Skip detailed context detection and just use entity ID/type. Defaults to FALSE.

array $context: (optional) The starting context array to modify.

Return value

array Array keyed with the entity type and array of entity IDs as the value.

1 method overrides SubscribersInterface::getBasicContext()
Subscribers::getBasicContext in src/Subscribers.php
Get context from a given entity type.

File

src/SubscribersInterface.php, line 116

Class

SubscribersInterface
Subscribers service.

Namespace

Drupal\message_subscribe

Code

public function getBasicContext(EntityInterface $entity, $skip_detailed_context = FALSE, array $context = []);