/**
* core of the installation
* @param ModuleInstallLauncher[] $modules
* @param EntryPoint $ep the entrypoint
* @param boolean $installWholeApp true if the installation is done during app installation
* @param integer $flags to know what to do
* @return boolean true if the installation is ok
*/
protected function _installModules(Resolver $resolver, EntryPoint $ep, $installWholeApp, $flags = 7)
{
$epId = $ep->getEpId();
$this->notice('install.entrypoint.start', $epId);
$ep = $this->entryPoints[$epId];
App::setConfig($ep->getConfigObj());
if ($ep->getConfigObj()->disableInstallers) {
$this->notice('install.entrypoint.installers.disabled');
}
$moduleschain = $this->resolveDependencies($resolver, $epId);
if ($moduleschain === false) {
return false;
}
$componentsToInstall = $this->runPreInstall($moduleschain, $ep, $installWholeApp, $flags);
if ($componentsToInstall === false) {
$this->warning('install.entrypoint.bad.end', $epId);
return false;
}
$installedModules = $this->runInstall($componentsToInstall, $ep, $epId, $flags);
if ($installedModules === false) {
$this->warning('install.entrypoint.bad.end', $epId);
return false;
}
$result = $this->runPostInstall($installedModules, $ep, $flags);
if (!$result) {
$this->warning('install.entrypoint.bad.end', $epId);
} else {
$this->ok('install.entrypoint.end', $epId);
}
return $result;
}