public function install()
{
$this->processSharedFileMounts();
// Create a settings.php file in sites/default if there isn't one.
$sitesDefault = $this->getWebRoot() . '/sites/default';
if (is_dir($sitesDefault) && !file_exists($sitesDefault . '/settings.php')) {
$this->fsHelper->copy(CLI_ROOT . '/resources/drupal/settings.php.dist', $sitesDefault . '/settings.php');
}
$this->installDrupalSettingsLocal();
// Symlink all files and folders from shared into sites/default.
$shared = $this->getSharedDir();
if ($shared !== false && is_dir($sitesDefault)) {
// Hidden files and files defined in "mounts" are skipped.
$skip = ['.*'];
foreach ($this->app->getSharedFileMounts() as $mount) {
list($skip[], ) = explode('/', $mount, 2);
}
$this->fsHelper->symlinkAll($shared, $sitesDefault, true, false, $skip);
}
}