You are here

class InitSubscriber in Lightbox2 8

Hierarchy

  • class \Drupal\lightbox2\EventSubscriber\InitSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of InitSubscriber

1 string reference to 'InitSubscriber'
lightbox2.services.yml in ./lightbox2.services.yml
lightbox2.services.yml
1 service uses InitSubscriber
init_subscriber in ./lightbox2.services.yml
Drupal\lightbox2\EventSubscriber\InitSubscriber

File

src/EventSubscriber/InitSubscriber.php, line 11
Contains \Drupal\lightbox2\EventSubscriber\InitSubscriber.

Namespace

Drupal\lightbox2\EventSubscriber
View source
class InitSubscriber implements EventSubscriberInterface {

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    return [
      KernelEvents::REQUEST => [
        'onEvent',
        0,
      ],
    ];
  }
  public function onEvent() {
    if (lightbox2_exclude_these_paths() != 1) {
      lightbox2_add_files();
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
InitSubscriber::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to.
InitSubscriber::onEvent public function