Lighter::getCodeGeneratorParams

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Lighter
  4. getCodeGeneratorParams
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/lighter/lighter.php
  • Класс: Bitrix\Crm\Counter\Lighter\Lighter
  • Вызов: Lighter::getCodeGeneratorParams
private function getCodeGeneratorParams(array $entitiesInfo, array $activities): array
{
	$actResponsibleMap = $this->activityResponsibleMap($activities);

	$codeGeneratorParams = [];
	foreach ($entitiesInfo as $entityInfo)
	{
		$typeId = $entityInfo['OWNER_TYPE_ID'];
		$categoryId = $entityInfo['CATEGORY_ID'] ?? 'None';

		$responsibleIds = $this->getResponsibleIds($entityInfo, $actResponsibleMap);

		if (!isset($codeGeneratorParams[$typeId]))
		{
			$codeGeneratorParams[$typeId] = [];
		}

		if (!isset($codeGeneratorParams[$typeId][$categoryId]))
		{
			$codeGeneratorParams[$typeId][$categoryId] = [];
		}

		$current = $codeGeneratorParams[$typeId][$categoryId] ?? [];

		$codeGeneratorParams[$typeId][$categoryId] = array_merge($current, $responsibleIds);
	}

	return $codeGeneratorParams;
}

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