yii\twig\Extension::path PHP Method

path() public method

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