Created router class, named intentionally wrong to keep to from working.
This commit is contained in:
parent
3d9d244b65
commit
7411516c5b
34
src/site/route.php
Normal file
34
src/site/route.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Joomla\CMS\Component\Router\RouterInterface;
|
||||||
|
|
||||||
|
// No direct access.
|
||||||
|
defined('_JEXEC') or die;
|
||||||
|
|
||||||
|
class ClubsRouter implements RouterInterface
|
||||||
|
{
|
||||||
|
public function build(&$query)
|
||||||
|
{
|
||||||
|
$ret = array();
|
||||||
|
// $ret[] = $query['Itemid'];
|
||||||
|
if(isset($query['view']))
|
||||||
|
{
|
||||||
|
$ret[] = $query['view'];
|
||||||
|
unset($query['view']);
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function parse(&$segments)
|
||||||
|
{
|
||||||
|
$ret = array();
|
||||||
|
//$ret['itemid'] = $segments[0];
|
||||||
|
$ret['view'] = $segments[0];
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
public function preprocess($query)
|
||||||
|
{
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user