public getAssetPath ( |
||
$bundle | the asset bundle which the asset file belongs to | |
$asset | string | the asset path. This should be one of the assets listed in [[AssetBundle::$js]] or [[AssetBundle::$css]]. |
return | string | false | the actual file path, or `false` if the asset is specified as an absolute URL |
public function getAssetPath($bundle, $asset)
{
if (($actualAsset = $this->resolveAsset($bundle, $asset)) !== false) {
return Url::isRelative($actualAsset) ? $this->basePath . '/' . $actualAsset : false;
} else {
return Url::isRelative($asset) ? $bundle->basePath . '/' . $asset : false;
}
}