Puli\Manager\Api\Module\RootModuleFile::addInstallInfo PHP Метод

addInstallInfo() публичный Метод

Adds install info for an installed module.
public addInstallInfo ( Puli\Manager\Api\Module\InstallInfo $installInfo )
$installInfo Puli\Manager\Api\Module\InstallInfo The install info.
    public function addInstallInfo(InstallInfo $installInfo)
    {
        $this->installInfos[$installInfo->getModuleName()] = $installInfo;
    }

Usage Example

Пример #1
0
 private function renameNonRootModule(Module $module, $newName)
 {
     $previousInstallInfo = $module->getInstallInfo();
     $installInfo = new InstallInfo($newName, $previousInstallInfo->getInstallPath());
     $installInfo->setInstallerName($previousInstallInfo->getInstallerName());
     foreach ($previousInstallInfo->getDisabledBindingUuids() as $uuid) {
         $installInfo->addDisabledBindingUuid($uuid);
     }
     $this->rootModuleFile->removeInstallInfo($module->getName());
     $this->rootModuleFile->addInstallInfo($installInfo);
     try {
         $this->moduleFileStorage->saveRootModuleFile($this->rootModuleFile);
     } catch (Exception $e) {
         $this->rootModuleFile->removeInstallInfo($newName);
         $this->rootModuleFile->addInstallInfo($previousInstallInfo);
         throw $e;
     }
     $this->modules->remove($module->getName());
     $this->modules->add(new Module($module->getModuleFile(), $module->getInstallPath(), $installInfo, $module->getLoadErrors()));
 }
All Usage Examples Of Puli\Manager\Api\Module\RootModuleFile::addInstallInfo