• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/rest.php
  • Класс: BitrixImOpenLinesRest
  • Вызов: Rest::configDelete
static function configDelete($arParams, $n, CRestServer $server)
{
	$arParams['CONFIG_ID'] = (int)$arParams['CONFIG_ID'];

	if ($arParams['CONFIG_ID'] <= 0)
	{
		throw new RestException('Config ID can't be empty', 'CONFIG_ID_EMPTY', CRestServer::STATUS_WRONG_REQUEST);
	}

	if (!Config::canEditLine($arParams['CONFIG_ID']))
	{
		throw new RestException('Permission denied', 'CONFIG_WRONG_USER_PERMISSION', CRestServer::STATUS_FORBIDDEN);
	}

	$config = new Config();

	return $config->delete($arParams['CONFIG_ID']);
}