src/TwigExtension.php
public function fullUrlFor($name, $data = [], $queryParams = [], $appName = 'default')
    {
        $path = $this->pathFor($name, $data, $queryParams, $appName);

        /** @var Uri $uri */
        if (is_string($this->uri)) {
            $uri = Uri::createFromString($this->uri);
        } else {
            $uri = $this->uri;
        }

        $scheme = $uri->getScheme();
        $authority = $uri->getAuthority();

        $host = ($scheme ? $scheme . ':' : '')
            . ($authority ? '//' . $authority : '');

        return $host.$path;
    }
public function fullUrlFor($name, $data = [], $queryParams = [], $appName = 'default')
    {
        $path = $this->pathFor($name, $data, $queryParams, $appName);

        /** @var Uri $uri */
        if (is_string($this->uri)) {
            $uri = Uri::createFromString($this->uri);
        } else {
            $uri = $this->uri;
        }

        $scheme = $uri->getScheme();
        $authority = $uri->getAuthority();

        $host = ($scheme ? $scheme . ':' : '')
            . ($authority ? '//' . $authority : '');

        return $host.$path;
    }
public function fullUrlFor ( $ name , $ data = [ ] , $ queryParams = [ ] , $ appName = 'default' ) { $ path = $ this -> pathFor ( $ name , $ data , $ queryParams , $ appName ) ; /** @var Uri $uri */ if ( is_string ( $ this -> uri ) ) { $ uri = Uri :: createFromString ( $ this -> uri ) ; } else { $ uri = $ this -> uri ; } $ scheme = $ uri -> getScheme ( ) ; $ authority = $ uri -> getAuthority ( ) ; $ host = ( $ scheme ? $ scheme . ':' : '' ) . ( $ authority ? '//' . $ authority : '' ) ; return $ host . $ path ; }
Similar to pathFor but returns a fully qualified URL

@param string $name The name of the route
@param array $data Route placeholders
@param array $queryParams
@param string $appName
@return string fully qualified URL
Similar to pathFor but returns a fully qualified URL