[EVENT][ROUTES] Add event to allow modules to add routes, 'add_route'

This commit is contained in:
Hugo Sales 2020-08-03 20:56:48 +00:00 committed by Hugo Sales
parent 152828ed68
commit 62e093c650
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}