• Модуль: imconnector
  • Путь к файлу: ~/bitrix/modules/imconnector/lib/rest/customconnectors.php
  • Класс: BitrixImConnectorRestCustomConnectors
  • Вызов: CustomConnectors::setErrorConnector
static function setErrorConnector($params, $n, CRestServer $server)
	{
		$result = array();

		$params = array_change_key_case($params, CASE_UPPER);

		if ($server->getAuthType() !== Auth::AUTH_TYPE)
		{
			throw new AuthTypeException("Application context required");
		}

		if (!isset($params['CONNECTOR']))
		{
			throw new ArgumentNullException("CONNECTOR");
		}

		if (!isset($params['LINE']))
		{
			throw new ArgumentNullException("LINE");
		}

		$resultSend = CC::deactivateConnectors($params['CONNECTOR'], $params['LINE']);

		if ($resultSend->isSuccess())
		{
			$result['SUCCESS'] = true;
		}
		else
		{
			$result['SUCCESS'] = false;
		}

		$result['DATA'] = $resultSend->getData();

		return $result;
	}