File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 2020use Cake \Core \ContainerInterface ;
2121use Cake \Datasource \FactoryLocator ;
2222use Cake \Error \Middleware \ErrorHandlerMiddleware ;
23+ use Cake \Event \EventManagerInterface ;
2324use Cake \Http \BaseApplication ;
2425use Cake \Http \Middleware \BodyParserMiddleware ;
2526use Cake \Http \Middleware \CsrfProtectionMiddleware ;
@@ -102,4 +103,18 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue
102103 public function services (ContainerInterface $ container ): void
103104 {
104105 }
106+
107+ /**
108+ * Register custom event listeners here
109+ *
110+ * @param \Cake\Event\EventManagerInterface $eventManager
111+ * @return \Cake\Event\EventManagerInterface
112+ * @link https://book.cakephp.org/5/en/core-libraries/events.html#registering-listeners
113+ */
114+ public function events (EventManagerInterface $ eventManager ): EventManagerInterface
115+ {
116+ // $eventManager->on(new SomeCustomListenerClass());
117+
118+ return $ eventManager ;
119+ }
105120}
You can’t perform that action at this time.
0 commit comments