public function onKernelRequest(GetResponseEvent $event)
    {
        if (null === $module = $event->getRequest()->get('module')) {
            return;
        }

        if (!$module instanceof ModuleInterface) {
            $module = $this->getModularRouter()->getModuleByRequest($event->getRequest());
        }

        // todo remove current module functionality, as it can lead to unexpected behavior
        $this->getModuleManager()->setCurrentModule($module);
    }
public function onKernelRequest(GetResponseEvent $event)
    {
        if (null === $module = $event->getRequest()->get('module')) {
            return;
        }

        if (!$module instanceof ModuleInterface) {
            $module = $this->getModularRouter()->getModuleByRequest($event->getRequest());
        }

        // todo remove current module functionality, as it can lead to unexpected behavior
        $this->getModuleManager()->setCurrentModule($module);
    }
public function onKernelRequest ( GetResponseEvent $ event ) { if ( null === $ module = $ event -> getRequest ( ) -> get ( 'module' ) ) { return ; } if ( ! $ module instanceof ModuleInterface ) { $ module = $ this -> getModularRouter ( ) -> getModuleByRequest ( $ event -> getRequest ( ) ) ; } // todo remove current module functionality, as it can lead to unexpected behavior $ this -> getModuleManager ( ) -> setCurrentModule ( $ module ) ; }
Handles actions before the kernel matches the controller.

@param GetResponseEvent $event
Handles actions before the kernel matches the controller .