function UnknownPathExcluder::getScaffoldFiles
Gets the path of scaffold files, for example 'index.php' and 'robots.txt'.
@todo Intelligently load scaffold files in https://drupal.org/i/3343802.
Return value
string[] The paths of scaffold files provided by `drupal/core`, relative to the project root.
1 call to UnknownPathExcluder::getScaffoldFiles()
- UnknownPathExcluder::getExcludedPaths in core/
modules/ package_manager/ src/ PathExcluder/ UnknownPathExcluder.php - Returns the paths to exclude from stage operations.
File
-
core/
modules/ package_manager/ src/ PathExcluder/ UnknownPathExcluder.php, line 192
Class
- UnknownPathExcluder
- Excludes unknown paths from stage operations.
Namespace
Drupal\package_manager\PathExcluderCode
private function getScaffoldFiles() : array {
$project_root = $this->pathLocator
->getProjectRoot();
$packages = $this->composerInspector
->getInstalledPackagesList($project_root);
$extra = Json::decode($this->composerInspector
->getConfig('extra', $packages['drupal/core']->path . '/composer.json'));
$scaffold_files = $extra['drupal-scaffold']['file-mapping'] ?? [];
return str_replace('[project-root]', '', array_keys($scaffold_files));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.