The router id is now configurable via setters and getters to allow
modules to use their own router.
This commit is contained in:
@@ -49,6 +49,21 @@ class BaseAdminController extends BaseController
|
||||
{
|
||||
const TEMPLATE_404 = "404";
|
||||
|
||||
/**
|
||||
* The current router identifier. The default is router.admin. Modules may use
|
||||
* setCurrentRouter() method to pass their own router, and use the route related
|
||||
* methods of this class.
|
||||
*/
|
||||
private $currentRouter = "router.admin";
|
||||
|
||||
protected function getCurrentRouter() {
|
||||
return $this->currentRouter;
|
||||
}
|
||||
|
||||
protected function setCurrentRouter($routerId) {
|
||||
$this->currentRouter = $routerId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to append a message to the admin log.
|
||||
*
|
||||
@@ -242,7 +257,7 @@ class BaseAdminController extends BaseController
|
||||
protected function getRoute($routeId, $parameters = array(), $referenceType = Router::ABSOLUTE_URL)
|
||||
{
|
||||
return $this->getRouteFromRouter(
|
||||
'router.admin',
|
||||
$this->currentRouter,
|
||||
$routeId,
|
||||
$parameters,
|
||||
$referenceType
|
||||
|
||||
Reference in New Issue
Block a user