src/base/Controller.php
public static function getActionUrl($action = 'index', $params = [])
    {
        $params = is_array($params) ? $params : ['id' => $params];

        return array_merge([implode('/', ['', static::moduleId(), static::controllerId(), $action])], $params);
    }
public static function getActionUrl($action = 'index', $params = [])
    {
        $params = is_array($params) ? $params : ['id' => $params];

        return array_merge([implode('/', ['', static::moduleId(), static::controllerId(), $action])], $params);
    }
public static function getActionUrl ( $ action = 'index' , $ params = [ ] ) { $ params = is_array ( $ params ) ? $ params : [ 'id' => $ params ] ; return array_merge ( [ implode ( '/' , [ '' , static :: moduleId ( ) , static :: controllerId ( ) , $ action ] ) ] , $ params ) ; }
Prepares array for building url to action based on given action id and parameters.

@param string $action action id
@param string|int|array $params ID of object to be action'ed or array of parameters
@return array array suitable for Url::to
Prepares array for building url to action based on given action id and parameters .