CCrmUserFieldRestProxy::getList

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmUserFieldRestProxy
  4. getList
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmUserFieldRestProxy
  • Вызов: CCrmUserFieldRestProxy::getList
public function getList(array $order, array $filter)
{
	$result = array();
	$tmpResult = parent::getList($order, $filter);

	if ($this->entityID === CCrmInvoice::GetUserFieldEntityID() && is_array($tmpResult) && !empty($tmpResult))
	{
		$invoiceReservedFields = array_fill_keys(CCrmInvoice::GetUserFieldsReserved(), true);

		foreach ($tmpResult as $index => $fieldInfo)
		{
			if ($index !== 'total'
				&& isset($fieldInfo['FIELD_NAME'])
				&& !isset($invoiceReservedFields[$fieldInfo['FIELD_NAME']]))
			{
				$result[] = $fieldInfo;
			}
		}

		$result['total'] = count($result);
	}
	else
	{
		$result = $tmpResult;
	}

	return $result;
}

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