You are here

public function TeamInvitationSubscriber::onCreated in Apigee Edge 8

Same name in this branch
  1. 8 modules/apigee_edge_teams/src/EventSubscriber/TeamInvitationSubscriber.php \Drupal\apigee_edge_teams\EventSubscriber\TeamInvitationSubscriber::onCreated()
  2. 8 modules/apigee_edge_teams/tests/modules/apigee_edge_teams_invitation_test/src/EventSubscriber/TeamInvitationSubscriber.php \Drupal\apigee_edge_teams_invitation_test\EventSubscriber\TeamInvitationSubscriber::onCreated()

Callback for on created event.

Parameters

\Drupal\apigee_edge_teams\Event\TeamInvitationEventInterface $event: The event.

File

modules/apigee_edge_teams/tests/modules/apigee_edge_teams_invitation_test/src/EventSubscriber/TeamInvitationSubscriber.php, line 49

Class

TeamInvitationSubscriber
Defines a subscriber for team_invitation events.

Namespace

Drupal\apigee_edge_teams_invitation_test\EventSubscriber

Code

public function onCreated(TeamInvitationEventInterface $event) {
  $team_invitation = $event
    ->getTeamInvitation();
  $team_invitation
    ->setLabel("CREATED")
    ->save();
}