yii\base\Theme::getUrl PHP Method

getUrl() public method

Converts a relative URL into an absolute URL using [[baseUrl]].
public getUrl ( string $url ) : string
$url string the relative URL to be converted.
return string the absolute URL
    public function getUrl($url)
    {
        if (($baseUrl = $this->getBaseUrl()) !== null) {
            return $baseUrl . '/' . ltrim($url, '/');
        } else {
            throw new InvalidConfigException('The "baseUrl" property must be set.');
        }
    }