yii\twig\Extension::url PHP Method

url() public method

Generates absolute URL
public url ( string $path, array $args = [] ) : string
$path string the parameter to be used to generate a valid URL
$args array arguments
return string the generated absolute URL
    public function url($path, $args = [])
    {
        if (is_array($path)) {
            $path = array_merge($path, $args);
        } elseif ($args !== []) {
            $path = array_merge([$path], $args);
            //bc
        }
        return Url::to($path, true);
    }