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.
2 calls to SiteConfigurationExcluder::getDefaultSiteDirectoryPath()
- SiteConfigurationExcluder::makeDefaultSiteDirectoryWritable in core/
modules/ package_manager/ src/ PathExcluder/ SiteConfigurationExcluder.php - Makes the staged `sites/default` directory owner-writable.
- SiteConfigurationExcluder::syncDefaultSiteDirectoryPermissions in core/
modules/ package_manager/ src/ PathExcluder/ SiteConfigurationExcluder.php - Makes `sites/default` permissions the same in live and stage directories.
File
-
core/
modules/ package_manager/ src/ PathExcluder/ SiteConfigurationExcluder.php, line 125
Class
- SiteConfigurationExcluder
- Excludes site configuration files from stage directories.
Namespace
Drupal\package_manager\PathExcluderCode
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.