84 public function set($configID, array $config, array $params)
94 $userScopeId = $params[
'userScopeId'] ?? 0;
97 && isset($params[
'forAllUsers'])
98 && $params[
'forAllUsers'] ===
'Y';
102 if(isset($params[
'delete']) && $params[
'delete'] ===
'Y')
104 \CUserOptions::DeleteOptionsByName(
$categoryName, $configID);
106 \CUserOptions::SetOption(
$categoryName, $configID, $config,
true);
111 \CUserOptions::SetOption(
122 elseif($userScopeId > 0)
124 Scope::getInstance()->updateScopeConfig(
130 $options = isset($params[
'options']) && is_array($params[
'options']) ? $params[
'options'] : array();
133 $optionName = static::prepareOptionsName($configID, $scope, $userScopeId);
136 \CUserOptions::SetOption(
147 if(isset($params[
'delete']) && $params[
'delete'] ===
'Y')
149 \CUserOptions::DeleteOptionsByName(
$categoryName, $optionName);
151 \CUserOptions::SetOption(
$categoryName, $optionName, $options,
true);
153 \CUserOptions::SetOption(
$categoryName, $optionName, $options);
158 public function reset($configID, array $params)
169 && isset($params[
'forAllUsers'])
170 && $params[
'forAllUsers'] ===
'Y';
174 \CUserOptions::DeleteOption(
180 \CUserOptions::DeleteOption(
182 static::prepareOptionsName($configID, $scope),
192 \CUserOptions::DeleteOptionsByName(
$categoryName, static::prepareOptionsName($configID, $scope));
198 \CUserOptions::DeleteOption(
$categoryName, static::prepareOptionsName($configID, $scope));
200 \CUserOptions::SetOption(