You are here

static function LtiToolProviderEvent::dispatchEvent in LTI Tool Provider 8

Same name and namespace in other branches
  1. 2.x src/LtiToolProviderEvent.php \Drupal\lti_tool_provider\LtiToolProviderEvent::dispatchEvent()

Dispatch an LTI Tool Provider event.

Parameters

EventDispatcherInterface $eventDispatcher: The event dispatcher.

LtiToolProviderEvent $event: The event to dispatch.

Throws

Exception

10 calls to LtiToolProviderEvent::dispatchEvent()
LTIToolProvider::authenticate in src/Authentication/Provider/LTIToolProvider.php
Authenticates the user.
LTIToolProvider::provisionUser in src/Authentication/Provider/LTIToolProvider.php
Provision a user that matches the LTI request context info.
LtiToolProviderAttributesEventSubscriber::onAuthenticated in modules/lti_tool_provider_attributes/src/EventSubscriber/LtiToolProviderAttributesEventSubscriber.php
LTIToolProviderController::ltiLaunch in src/Controller/LTIToolProviderController.php
LTI launch.
LTIToolProviderController::ltiReturn in src/Controller/LTIToolProviderController.php
LTI return.

... See full list

File

src/LtiToolProviderEvent.php, line 57

Class

LtiToolProviderEvent

Namespace

Drupal\lti_tool_provider

Code

static function dispatchEvent(EventDispatcherInterface $eventDispatcher, LtiToolProviderEvent &$event) {
  $event = $eventDispatcher
    ->dispatch($event::EVENT_NAME, $event);
  if ($event instanceof LtiToolProviderEvent && $event
    ->isCancelled()) {
    throw new Exception($event
      ->getMessage());
  }
}