Skip to content

Commit

Permalink
#372 - Add url router
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjanssens committed Jun 17, 2020
1 parent f873bcf commit ccffcc6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ protected function _initialize(KObjectConfig $config)
'page' => 'com://site/pages.dispatcher.router.pages',
'site' => 'com://site/pages.dispatcher.router.site',
'redirect' => 'com://site/pages.dispatcher.router.redirect',
'url' => 'com://site/pages.dispatcher.router.url',
],
));

Expand Down
24 changes: 24 additions & 0 deletions code/site/components/com_pages/dispatcher/router/url.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* Joomlatools Pages
*
* @copyright Copyright (C) 2018 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link https://github.com/joomlatools/joomlatools-pages for the canonical source repository
*/

class ComPagesDispatcherRouterUrl extends ComPagesDispatcherRouterAbstract
{
protected function _initialize(KObjectConfig $config)
{
$config->append([
'routes' => []
])->append([
'resolvers' => [
'regex' => ['routes' => $config->routes],
]
]);

parent::_initialize($config);
}
}

0 comments on commit ccffcc6

Please sign in to comment.