protected urlForModuleActionWithDefaultUserParams ( string $module, string $controllerAction, array $additionalParams = [] ) : array | null | ||
$module | string | The name of the module/plugin the action belongs to. The module name is case sensitive. |
$controllerAction | string | The name of the action that should be executed within your controller |
$additionalParams | array | Optional URL parameters that will be appended to the URL |
Результат | array | null | Returns the array of query parameter names and values to the given module action and idSite date and period. Returns null if the module or action is invalid. |
protected function urlForModuleActionWithDefaultUserParams($module, $controllerAction, $additionalParams = array())
{
$urlModuleAction = $this->urlForModuleAction($module, $controllerAction);
$date = Common::getRequestVar('date', false);
if ($date) {
$urlModuleAction['date'] = $date;
}
$period = Common::getRequestVar('period', false);
if ($period) {
$urlModuleAction['period'] = $period;
}
// We want the current query parameters to override the user's defaults
return array_merge($this->urlForDefaultUserParams(), $urlModuleAction, $additionalParams);
}