Jelix\Installer\Installer::setModuleParameters PHP Method

setModuleParameters() public method

set parameters for the installer of a module
public setModuleParameters ( string $moduleName, array $parameters, string $entrypoint = null )
$moduleName string the name of the module
$parameters array parameters
$entrypoint string the entry point name for which parameters will be applied when installing the module. if null, parameters are valid for all entry points
    public function setModuleParameters($moduleName, $parameters, $entrypoint = null)
    {
        if ($entrypoint !== null) {
            if (!isset($this->epId[$entrypoint])) {
                throw new \Exception("Unknown entrypoint name");
            }
            $epId = $this->epId[$entrypoint];
            if (!isset($this->entryPoints[$epId])) {
                throw new \Exception("Unknown entrypoint name");
            }
            $launcher = $this->entryPoints[$epId]->getLauncher($moduleName);
            if ($launcher) {
                $launcher->setInstallParameters($epId, $parameters);
            }
        } else {
            foreach ($this->entryPoints as $epId => $ep) {
                $launcher = $ep->getLauncher($moduleName);
                if ($launcher) {
                    $launcher->setInstallParameters($epId, $parameters);
                }
            }
        }
    }