Routing
Where are routes defined?
<?php
class UserConfig extends moduleConfig {
/**
* Defines all of the routes relevant to the User module.
*
* @return route[]
*/
public static function getRoutes() {
return array(
new route(array(
'id' => 'user_list',
'name' => 'Our Users',
'route' => '/users/list',
'controller' => 'UsersController@index',
'method' => 'GET',
'priority' => route::PRIORITY_HIGH,
'protected' => false
))
);
}
}Basic Route
Route constructor options
Siteadmin Route
Resource Route
URL Parameters & Regular Expressions
Numeric ID with variable length
Numeric ID with fixed length
String parameter
Multiple Parameters
Optional Parameters
Passing URL Parameters to a Controller
Find route object by ID
Last updated