function SiteConfigurationExcluder::getDefaultSiteDirectoryPath

Returns the full path to `sites/default`, relative to a root directory.

Parameters

string $root_dir: The root directory.

Return value

string The full path to `sites/default` within the given root directory.

File

core/modules/package_manager/src/PathExcluder/SiteConfigurationExcluder.php, line 125

Class

SiteConfigurationExcluder
Excludes site configuration files from stage directories.

Namespace

Drupal\package_manager\PathExcluder

Code

private function getDefaultSiteDirectoryPath(string $root_dir) : string {
    $dir = [
        $root_dir,
    ];
    $web_root = $this->pathLocator
        ->getWebRoot();
    if ($web_root) {
        $dir[] = $web_root;
    }
    return implode(DIRECTORY_SEPARATOR, [
        $dir,
        'sites',
        'default',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.