Yaffs site version 1.1
[yaffs-website] / web / modules / contrib / advagg / advagg_bundler / src / EventSubscriber / InitSubscriber.php
1 <?php
2
3 namespace Drupal\advagg_bundler\EventSubscriber;
4
5 use Symfony\Component\HttpKernel\KernelEvents;
6 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
7
8 /**
9  * Set the AdvAgg setting core_groups to FALSE if bundler is enabled.
10  */
11 class InitSubscriber implements EventSubscriberInterface {
12
13   /**
14    * {@inheritdoc}
15    */
16   public static function getSubscribedEvents() {
17     return [KernelEvents::REQUEST => ['onEvent', 0]];
18   }
19
20   /**
21    * Event Response.
22    */
23   public function onEvent() {
24     if (advagg_bundler_enabled()) {
25       $GLOBALS['conf']['core_groups'] = FALSE;
26     }
27   }
28
29 }