function MockPathLocator::getProjectRoot
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ MockPathLocator.php, line 41
Class
- MockPathLocator
- Mock path locator: allows specifying paths instead of discovering paths.
Namespace
Drupal\package_manager_bypassCode
public function getProjectRoot() : string {
$project_root = $this->state
->get(static::class . ' root');
if ($project_root === NULL) {
$project_root = $this->getVendorDirectory() . DIRECTORY_SEPARATOR . '..';
$project_root = realpath($project_root);
}
return $project_root;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.