Piwik\Plugin\Menu::urlForAction PHP Метод

urlForAction() защищенный Метод

Generates a URL for the given action. In your plugin controller you have to create a method with the same name as this method will be executed when a user clicks on the menu item. If you want to generate a URL for the action of another module, meaning not your plugin, you should use the method {@link urlForModuleAction()}.
С версии: 2.7.0
protected urlForAction ( string $controllerAction, array $additionalParams = [] ) : array
$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
    protected function urlForAction($controllerAction, $additionalParams = array())
    {
        $module = $this->getModule();
        $this->checkisValidCallable($module, $controllerAction);
        $params = (array) $additionalParams;
        $params['action'] = $controllerAction;
        $params['module'] = $module;
        return $params;
    }