public function url($reset = true)
    {
        $output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $this->get('filepath'));

        $locator = Grav::instance()['locator'];
        if ($locator->isStream($output)) {
            $output = $locator->findResource($output, false);
        }

        if ($reset) {
            $this->reset();
        }

        return trim(Grav::instance()['base_url'] . '/' . $this->urlQuerystring($output), '\\');
    }
public function url($reset = true)
    {
        $output = preg_replace('|^' . preg_quote(GRAV_ROOT, '|') . '|', '', $this->get('filepath'));

        $locator = Grav::instance()['locator'];
        if ($locator->isStream($output)) {
            $output = $locator->findResource($output, false);
        }

        if ($reset) {
            $this->reset();
        }

        return trim(Grav::instance()['base_url'] . '/' . $this->urlQuerystring($output), '\\');
    }
public function url ( $ reset = true ) { $ output = preg_replace ( '|^' . preg_quote ( GRAV_ROOT , '|' ) . '|' , '' , $ this -> get ( 'filepath' ) ) ; $ locator = Grav :: instance ( ) [ 'locator' ] ; if ( $ locator -> isStream ( $ output ) ) { $ output = $ locator -> findResource ( $ output , false ) ; } if ( $ reset ) { $ this -> reset ( ) ; } return trim ( Grav :: instance ( ) [ 'base_url' ] . '/' . $ this -> urlQuerystring ( $ output ) , '\\' ) ; }
Return URL to file.

@param bool $reset
@return string
Return URL to file .