From 62e093c650cd90a66c859774d156eb4c704c5837 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Mon, 3 Aug 2020 20:56:48 +0000 Subject: [PATCH] [EVENT][ROUTES] Add event to allow modules to add routes, 'add_route' --- src/Core/Router/RouteLoader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core/Router/RouteLoader.php b/src/Core/Router/RouteLoader.php index 864b7d533e..6bfb7e8906 100644 --- a/src/Core/Router/RouteLoader.php +++ b/src/Core/Router/RouteLoader.php @@ -34,6 +34,7 @@ namespace App\Core\Router; +use App\Core\Event; use Symfony\Component\Config\Loader\Loader; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; @@ -61,6 +62,8 @@ class RouteLoader extends Loader $ns::load($this); } + Event::handle('add_route', [&$this]); + return $this->rc; }