class BrightcoveInitSubscriber in Brightcove Video Connect 8
Same name and namespace in other branches
- 8.2 src/EventSubscriber/BrightcoveInitSubscriber.php \Drupal\brightcove\EventSubscriber\BrightcoveInitSubscriber
- 3.x src/EventSubscriber/BrightcoveInitSubscriber.php \Drupal\brightcove\EventSubscriber\BrightcoveInitSubscriber
Subscribes to Drupal initialization event.
Hierarchy
- class \Drupal\brightcove\EventSubscriber\BrightcoveInitSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of BrightcoveInitSubscriber
1 string reference to 'BrightcoveInitSubscriber'
1 service uses BrightcoveInitSubscriber
File
- src/
EventSubscriber/ BrightcoveInitSubscriber.php, line 13
Namespace
Drupal\brightcove\EventSubscriberView source
class BrightcoveInitSubscriber implements EventSubscriberInterface {
/**
* Initialize Brightcove client proxy.
*
* @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
* GET response event.
*/
public function initializeBrightcoveClient(GetResponseEvent $event) {
Client::$consumer = 'Drupal/' . \Drupal::VERSION . ' Brightcove/' . (system_get_info('module', 'brightcove')['version'] ?: 'dev');
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
$events[KernelEvents::REQUEST][] = [
'initializeBrightcoveClient',
];
return $events;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BrightcoveInitSubscriber:: |
public static | function | Returns an array of event names this subscriber wants to listen to. | |
BrightcoveInitSubscriber:: |
public | function | Initialize Brightcove client proxy. |