src/core/AppHelper.php
public function getComponentRoot(string $name): ?string
    {
        $rootMap = $this->getConfig('componentsRootMap');
        return isset($rootMap[$name]) ? $this->getAppRoot().$rootMap[$name] : null;
    }
public function getComponentRoot(string $name): ?string
    {
        $rootMap = $this->getConfig('componentsRootMap');
        return isset($rootMap[$name]) ? $this->getAppRoot().$rootMap[$name] : null;
    }
The method returns full path to the parent directory of component by its
name.
@param string $name The component name.
@return string|null