hasInstallInfo() public method

Returns whether an install info with a given name exists.
public hasInstallInfo ( string $moduleName ) : boolean
$moduleName string The name of the module.
return boolean Whether install info with that name exists.
Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function removeModule($name)
 {
     // Only check that this is a string. The error message "not found" is
     // more helpful than e.g. "module name must contain /".
     Assert::string($name, 'The module name must be a string. Got: %s');
     $this->assertModulesLoaded();
     if ($this->rootModuleFile->hasInstallInfo($name)) {
         $installInfo = $this->rootModuleFile->getInstallInfo($name);
         $this->rootModuleFile->removeInstallInfo($name);
         try {
             $this->moduleFileStorage->saveRootModuleFile($this->rootModuleFile);
         } catch (Exception $e) {
             $this->rootModuleFile->addInstallInfo($installInfo);
             throw $e;
         }
     }
     $this->modules->remove($name);
 }