• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/classes/general/calendar_restservice.php
  • Класс: CCalendarRestService
  • Вызов: CCalendarRestService::SettingsSet
static function SettingsSet($params = [], $nav = null, $server = null)
{
	global $USER;
	$methodName = "calendar.settings.set";

	if (!$USER->CanDoOperation('bitrix24_config') && !$USER->CanDoOperation('edit_php'))
	{
		throw new RestException(Loc::getMessage('CAL_REST_ACCESS_DENIED'));
	}

	if (!isset($params['settings']))
	{
		throw new RestException(Loc::getMessage('CAL_REST_PARAM_EXCEPTION', [
			'#PARAM_NAME#' => 'settings',
			'#REST_METHOD#' => $methodName
		]));
	}

	CCalendar::SetSettings($params['settings']);

	return true;
}