• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/preset/eventcontroller.php
  • Класс: BitrixRestPresetEventController
  • Вызов: EventController::onAddAppLang
static function onAddAppLang(Event $event)
{
	if (!static::$skipMode)
	{
		$id = intVal($event->getParameter('id'));
		$fields = $event->getParameter('fields');
		if ($id > 0 && !empty(static::$tmpAppList[$fields['APP_ID']]) && !isset(static::$tmpUsesLangAppList[$fields['APP_ID']]))
		{
			static::$tmpUsesLangAppList[$fields['APP_ID']] = $fields['LANGUAGE_ID'];
			try
			{
				$integrationId = static::$tmpAppList[$fields['APP_ID']];
				IntegrationTable::update(
					$integrationId,
					[
						'APPLICATION_ONLY_API' => 'N',
					]
				);
			}
			catch (Exception $e)
			{
			}
		}
	}
}