예제 #1
0
 /**
  * Listener for the `installer.subscriberarea.uninstalled` event.
  *
  * Called after a hook subscriber area has been unregistered.
  * Receives args['areaid'] as the areaId. Use this to remove orphan data associated with this area.
  *
  * @param GenericEvent $event The event instance.
  */
 public function subscriberAreaUninstalled(GenericEvent $event)
 {
     parent::subscriberAreaUninstalled($event);
 }
 /**
  * Listener for the `installer.subscriberarea.uninstalled` event.
  *
  * Called after a hook subscriber area has been unregistered.
  * Receives args['areaid'] as the areaId. Use this to remove orphan data associated with this area.
  *
  * @param GenericEvent $event The event instance.
  */
 public function subscriberAreaUninstalled(GenericEvent $event)
 {
     parent::subscriberAreaUninstalled($event);
     // you can access general data available in the event
     // the event name
     // echo 'Event: ' . $event->getName();
     // type of current request: MASTER_REQUEST or SUB_REQUEST
     // if a listener should only be active for the master request,
     // be sure to check that at the beginning of your method
     // if ($event->getRequestType() !== HttpKernelInterface::MASTER_REQUEST) {
     //     // don't do anything if it's not the master request
     //     return;
     // }
     // kernel instance handling the current request
     // $kernel = $event->getKernel();
     // the currently handled request
     // $request = $event->getRequest();
 }
예제 #3
0
 /**
  * Listener for the `module.remove` event.
  *
  * Called after a module has been successfully removed.
  * Receives `$modinfo` as args.
  *
  * @param ModuleStateEvent $event The event instance.
  */
 public function moduleRemoved(ModuleStateEvent $event)
 {
     parent::moduleRemoved($event);
     $module = $event->getModule();
     if ($module === null || $module->getName() == 'ZikulaRoutesModule') {
         return;
     }
     // reload **all** JS routes
     $this->routeDumperHelper->dumpJsRoutes();
     $this->cacheClearer->clear('symfony.routing');
 }