yii\web\AssetManager::getPublishedUrl PHP Method

getPublishedUrl() public method

This method does not perform any publishing. It merely tells you if the file path is published, what the URL will be to access it.
public getPublishedUrl ( string $path ) : string | false
$path string directory or file path being published
return string | false string the published URL for the file or directory. False if the file or directory does not exist.
    public function getPublishedUrl($path)
    {
        $path = Yii::getAlias($path);
        if (isset($this->_published[$path])) {
            return $this->_published[$path][1];
        }
        if (is_string($path) && ($path = realpath($path)) !== false) {
            return $this->baseUrl . '/' . $this->hash($path) . (is_file($path) ? '/' . basename($path) : '');
        } else {
            return false;
        }
    }