You are here

public function EdgeEntityAddMemberEventDeriver::getContext in Apigee Edge 8

Returns an array of event context.

Parameters

\Drupal\apigee_edge\Entity\EdgeEntityTypeInterface $entity_type: The Apigee Edge entity type.

Return value

array An array of event context.

Overrides EdgeEntityEventDeriverBase::getContext

File

modules/apigee_edge_actions/src/Plugin/RulesEvent/EdgeEntityAddMemberEventDeriver.php, line 51

Class

EdgeEntityAddMemberEventDeriver
Deriver for Edge entity add_member events.

Namespace

Drupal\apigee_edge_actions\Plugin\RulesEvent

Code

public function getContext(EdgeEntityTypeInterface $entity_type) : array {
  $context = parent::getContext($entity_type);

  // Add the team member to the context.
  $context['member'] = [
    'type' => 'entity:user',
    'label' => $this
      ->t('Member'),
  ];
  return $context;
}