CCrmRequisiteLinkRestProxy::checkRequisiteLinks

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRequisiteLinkRestProxy
  4. checkRequisiteLinks
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRequisiteLinkRestProxy
  • Вызов: CCrmRequisiteLinkRestProxy::checkRequisiteLinks
protected function checkRequisiteLinks($entityTypeId, $entityId,
										$requisiteId, $bankDetailId,
										$mcRequisiteId, $mcBankDetailId, &$errors)
{
	$params = array(
		'ENTITY_TYPE_ID' => $entityTypeId,
		'ENTITY_ID' => $entityId,
		'REQUISITE_ID' => $requisiteId,
		'BANK_DETAIL_ID' => $bankDetailId,
		'MC_REQUISITE_ID' => $mcRequisiteId,
		'MC_BANK_DETAIL_ID' => $mcBankDetailId,
	);

	foreach ($params as $paramName => $value)
	{
		if ($value === '' || intval($value) < 0
			|| (($paramName === 'ENTITY_TYPE_ID' || $paramName === 'ENTITY_ID') && intval($value) === 0))
		{
			$errors[] = $paramName.' is not defined or invalid.';
			return false;
		}
	}

	return true;
}

Добавить комментарий