setInstallInfos() public method

Sets the install infos of all installed modules.
public setInstallInfos ( array $installInfos )
$installInfos array
コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function removeModules(Expression $expr)
 {
     $this->assertModulesLoaded();
     $installInfos = $this->rootModuleFile->getInstallInfos();
     $modules = $this->modules->toArray();
     foreach ($this->modules->getInstalledModules() as $module) {
         if ($expr->evaluate($module)) {
             $this->rootModuleFile->removeInstallInfo($module->getName());
             $this->modules->remove($module->getName());
         }
     }
     if (!$installInfos) {
         return;
     }
     try {
         $this->moduleFileStorage->saveRootModuleFile($this->rootModuleFile);
     } catch (Exception $e) {
         $this->rootModuleFile->setInstallInfos($installInfos);
         $this->modules->replace($modules);
         throw $e;
     }
 }