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

Installs the module at the given path in the repository.
public installModule ( string $installPath, string | null $name = null, string $installerName = InstallInfo::DEFAULT_INSTALLER_NAME, string $env = Environment::PROD )
$installPath string The path to the module.
$name string | null The module name or `null` if the name should be read from the module's puli.json.
$installerName string The name of the installer.
$env string The environment to install the module in.
Пример #1
0
 /**
  * Handles the "module --install" command.
  *
  * @param Args $args The console arguments
  *
  * @return int The status code
  */
 public function handleInstall(Args $args)
 {
     $moduleName = $args->getArgument('name');
     $installPath = Path::makeAbsolute($args->getArgument('path'), getcwd());
     $installer = $args->getOption('installer');
     $env = $args->isOptionSet('dev') ? Environment::DEV : Environment::PROD;
     $this->moduleManager->installModule($installPath, $moduleName, $installer, $env);
     return 0;
 }