Adds settings to database.

@param array  $moduleSettings Module settings array
@param string $moduleId       Module id
491332
protected function _addModuleSettings($moduleSettings, $moduleId)
    {
        $config = $this->getConfig();
        $shopId = $config->getShopId();
        if (is_array($moduleSettings)) {
            foreach ($moduleSettings as $setting) {

                $module = $this->getModuleConfigId($moduleId);
                $name = $setting["name"];
                $type = $setting["type"];

                $value = is_null($config->getConfigParam($name)) ? $setting["value"] : $config->getConfigParam($name);

                $changed = $config->saveShopConfVar($type, $name, $value, $shopId, $module);
                if ($changed) {
                    $this->output->writeln("$moduleId: setting for '$name' fixed'");
                    $this->needCacheClear = $this->needCacheClear || $changed;
                }
            }
        }
    }
182098
public function handleOnModuleActivation(ModuleSetting $moduleSetting, string $moduleId, int $shopId)
    {
        if (!$this->canHandle($moduleSetting)) {
            throw new WrongModuleSettingException($moduleSetting, self::class);
        }

        $shopConfigurationSetting = $this->getShopConfigurationSetting($shopId);

        $shopSettingValue = array_merge(
            $shopConfigurationSetting->getValue(),
            [
                $moduleId => $moduleSetting->getValue(),
            ]
        );

        $shopConfigurationSetting->setValue($shopSettingValue);

        $this->shopConfigurationSettingDao->save($shopConfigurationSetting);
    }
89110
protected function applyConfig(array $moduleConfiguration)
    {
        foreach ($moduleConfiguration['smarty_filter'] as $smartyFilterData) {
            if (SmartyFilterQuery::create()->findOneByCode($smartyFilterData['code']) === null) {
                $smartyFilter = (new SmartyFilter())
                    ->setCode($smartyFilterData['code']);

                foreach ($smartyFilterData['descriptive'] as $descriptiveData) {
                    $smartyFilter
                        ->setLocale($descriptiveData['locale'])
                        ->setTitle($descriptiveData['title'])
                        ->setDescription($descriptiveData['description'])
                        ->setFiltertype($descriptiveData['type']);
                }

                $smartyFilter->save();
            }
        }
    }
550178
public function validate(ModuleSetting $moduleSetting, string $moduleId, int $shopId)
    {
        if (!$this->canValidate($moduleSetting)) {
            throw new WrongModuleSettingException($moduleSetting, self::class);
        }

        $shopControllerClassMap = $this->shopAdapter->getShopControllerClassMap();

        $controllerClassMap = array_merge(
            $shopControllerClassMap,
            $this->getModulesControllerClassMap($shopId)
        );

        $this->validateForControllerKeyDuplication($moduleSetting, $controllerClassMap);
        $this->validateForControllerNamespaceDuplication($moduleSetting, $controllerClassMap);
    }
291128
function SetSettings(settings) {
		try { CFG = TLS.Fill(settings, CFG); Dbg = CFG.Debug } 
		catch (error) { LG.IF(error); }
	}
1150743
protected void install(Module module) {
        module.setSettings(settings);
        module.setServices(services);
        binder().install(module);
    }
1093506
public function setDependencies(array $moduleNames)
    {
        $this->dependencies = array();

        foreach ($moduleNames as $moduleName) {
            $this->dependencies[$moduleName] = true;
        }
    }
538293
public static function set($module,$key,$value=null){
        $data=self::getModuleFromDB($module);
        if(!$data){
            $data=[];
        }
        if(is_array($key)){
            $data=array_merge($data,$key);
        }else{
            $data[$key]=$value;
        }
        $data=json_encode($data);
        $config=self::get("config");
        $table=$config&&key_exists('db_table',$config)?$config['db_table']:"config";
        $module_key=$config&&key_exists('module_field',$config)?$config['module_field']:"module";
        $content=$config&&key_exists('content_field',$config)?$config['content_field']:"content";
        Update::table($table)->set($content,$data)
            ->where($module_key,$module)
            ->excuse();
        Cache::remove(md5("config_".$module));
    }
185090
public function handleOnModuleActivation(ModuleSetting $moduleSetting, string $moduleId, int $shopId)
    {
        if (!$this->canHandle($moduleSetting)) {
            throw new WrongModuleSettingException($moduleSetting, self::class);
        }

        foreach ($moduleSetting->getValue() as $shopModuleSettingData) {
            $shopModuleSetting = new ShopModuleSetting();
            $shopModuleSetting
                ->setShopId($shopId)
                ->setModuleId($moduleId);

            $shopModuleSetting = $this->mapDataToShopModuleSetting($shopModuleSetting, $shopModuleSettingData);

            $this->shopModuleSettingDao->save($shopModuleSetting);
        }
    }
415864
public function getSettings($module_id, $key = null, $default = null)
    {
        $module = $this->get($module_id);

        if (empty($module['settings'])) {
            return $default;
        }

        if (!isset($key)) {
            return (array) $module['settings'];
        }

        $value = gplcart_array_get($module['settings'], $key);
        return isset($value) ? $value : $default;
    }
221825
public function addModule(ModuleInterface ...$modules): ApplicationBuilder
    {
        foreach ($modules as $module) {
            $this->modules[] = $module;
        }

        return $this;
    }
935974
public function addSettings( $settings )
    {
        $this->settings = ArrayUtils::merge(
            $this->settings,
            ArrayUtils::iteratorToArray( $settings )
        );

        return $this;
    }
11155
public function remove($moduleId)
    {
        $controllerMap = $this->get();
        unset($controllerMap[strtolower($moduleId)]);

        $this->set($controllerMap);
    }
791959
public function setActive(string $moduleId, int $shopId)
    {
        if ($this->isActive($moduleId, $shopId)) {
            throw new ModuleStateIsAlreadySetException(
                'Active status for module "' . $moduleId . '" and shop with id "' . $shopId . '" is already set.'
            );
        }

        $activeModuleIdsSetting = $this->getActiveModulesShopConfigurationSetting($shopId);

        $activeModuleIds = $activeModuleIdsSetting->getValue();
        $activeModuleIds[] = $moduleId;
        $activeModuleIdsSetting->setValue($activeModuleIds);

        $this->shopConfigurationSettingDao->save($activeModuleIdsSetting);
    }
205014
public function deleteConfigValue($moduleId, $variableName)
    {
        if (null !== $moduleConfig = self::create()
            ->filterByModuleId($moduleId)
            ->filterByName($variableName)
            ->findOne()
        ) {
            $moduleConfig->delete();
        };

        return $this;
    }
216860
function addSettings(cacheModule){
    cacheModule.nameSpace = settings.nameSpace;
    cacheModule.verbose = settings.verbose;
    return cacheModule;
  }
981723
public void addExtraModule(String moduleId) {
		if (extraModules == null) {
			extraModules = new LinkedList<String>();
		}
		extraModules.add(moduleId);
	}