• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integrity/duplicatecommunicationcriterion.php
  • Класс: Bitrix\Crm\Integrity\DuplicateCommunicationCriterion
  • Вызов: DuplicateCommunicationCriterion::extractMultifieldsValues
static function extractMultifieldsValues(array $multifields, $type, $valueType = '')
{
	if(!is_string($type))
	{
		throw new Main\ArgumentTypeException('type', 'string');
	}

	$result = array();
	if(isset($multifields[$type]) && is_array($multifields[$type]))
	{
		$checkValueType = $valueType !== '';
		foreach($multifields[$type] as &$data)
		{
			$curentValue = isset($data['VALUE']) ? $data['VALUE'] : '';
			$currentValueType = isset($data['VALUE_TYPE']) ? $data['VALUE_TYPE'] : '';
			if($curentValue === '' || ($checkValueType && $currentValueType !== $valueType))
			{
				continue;
			}

			$result[] = $curentValue;
		}
		unset($data);
	}
	return $result;
}