src/View/Helper/UrlHelper.php
public function assetPath($source, $type = null)
    {
        $ext  = FS::ext($source);
        $type = (empty($type)) ? $ext : $type;

        $path = FS::clean(WWW_ROOT . '/' . $source, '/');
        if (FS::isFile($path)) {
            return $path;
        }

        $path = FS::clean(WWW_ROOT . '/' . $type . '/' . $source, '/');
        if (FS::isFile($path)) {
            return $path;
        }

        $path = $this->_findPluginAsset($source, $type);

        return $path;
    }
public function assetPath($source, $type = null)
    {
        $ext  = FS::ext($source);
        $type = (empty($type)) ? $ext : $type;

        $path = FS::clean(WWW_ROOT . '/' . $source, '/');
        if (FS::isFile($path)) {
            return $path;
        }

        $path = FS::clean(WWW_ROOT . '/' . $type . '/' . $source, '/');
        if (FS::isFile($path)) {
            return $path;
        }

        $path = $this->_findPluginAsset($source, $type);

        return $path;
    }
public function assetPath ( $ source , $ type = null ) { $ ext = FS :: ext ( $ source ) ; $ type = ( empty ( $ type ) ) ? $ ext : $ type ; $ path = FS :: clean ( WWW_ROOT . '/' . $ source , '/' ) ; if ( FS :: isFile ( $ path ) ) { return $ path ; } $ path = FS :: clean ( WWW_ROOT . '/' . $ type . '/' . $ source , '/' ) ; if ( FS :: isFile ( $ path ) ) { return $ path ; } $ path = $ this -> _findPluginAsset ( $ source , $ type ) ; return $ path ; }
Get absolute asset path.

@param string $source Plugin.path/to/file.css
@param null|string $type Assets folder - default is file ext
@return bool|string
Get absolute asset path .