public function PathLocator::getWebRoot in Automatic Updates 8.2
Returns the path of the Drupal installation, relative to the project root.
Return value
string The path of the Drupal installation, relative to the project root and without leading or trailing slashes. Will return an empty string if the project root and Drupal root are the same.
File
- src/
PathLocator.php, line 102
Class
- PathLocator
- Computes file system paths that are needed for automatic updates.
Namespace
Drupal\automatic_updatesCode
public function getWebRoot() : string {
$web_root = str_replace($this
->getProjectRoot(), NULL, $this->appRoot);
return trim($web_root, DIRECTORY_SEPARATOR);
}