CCrmLiveFeedComponent::mergeBindings

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmLiveFeedComponent
  4. mergeBindings
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/livefeed.php
  • Класс: \CCrmLiveFeedComponent
  • Вызов: CCrmLiveFeedComponent::mergeBindings
static function mergeBindings($bindList1, $bindList2)
{
	if (!is_array($bindList2))
	{
		$bindList2 = array();
	}
	$result = $bindList2;

	foreach($bindList1 as $bind1)
	{
		$found = false;
		foreach($result as $bind2)
		{
			if (
				$bind1['OWNER_TYPE_ID'] == $bind2['OWNER_TYPE_ID']
				&& $bind1['OWNER_ID'] == $bind2['OWNER_ID']
			)
			{
				$found = true;
				break;
			}
		}

		if (!$found)
		{
			$result[] = $bind1;
		}
	}

	return $result;
}

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