src/core/AppHelper.php
public function getComponentUrl(string $name, bool $asAbsolute = true): ?string
    {
        $rootMap = $this->getConfig('componentsRootMap');
        $siteUrl = $asAbsolute ? $this->siteBaseUrl : '';
        return isset($rootMap[$name]) ? $siteUrl.$rootMap[$name] : null;
    }
public function getComponentUrl(string $name, bool $asAbsolute = true): ?string
    {
        $rootMap = $this->getConfig('componentsRootMap');
        $siteUrl = $asAbsolute ? $this->siteBaseUrl : '';
        return isset($rootMap[$name]) ? $siteUrl.$rootMap[$name] : null;
    }
The method returns absolute or relative path (URL) to the component by
passed name. The absolute URL used to determs path to assets (media-data)
as usual.
@param string $name The component name.
@param boolean $asAbsolute The optional flag is equal true by default.
@return string|null