MonitorByEntityResponsible::processActivitiesChanges

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. MonitorByEntityResponsible
  4. processActivitiesChanges
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/counter/monitor/monitorbyentityresponsible.php
  • Класс: Bitrix\Crm\Counter\Monitor\MonitorByEntityResponsible
  • Вызов: MonitorByEntityResponsible::processActivitiesChanges
protected function processActivitiesChanges(): void
{
	$changedActivities = $this->activitiesChangesCollection->getSignificantlyChangedActivities(false);
	$affectedBindings = $changedActivities->getAffectedBindings();
	$entitiesData = $this->loadEntitiesDataForBindings($affectedBindings);
	/** @var $changedActivity ActivityChange */
	foreach ($changedActivities->getValues() as $changedActivity)
	{
		$affectedTypeIds = $changedActivity->getAffectedCounterTypes();

		/** @var $binding ItemIdentifier */
		foreach ($changedActivity->getAffectedBindings() as $binding)
		{
			$entityData = $entitiesData[$binding->getEntityTypeId()][$binding->getEntityId()] ?? [];
			$this->resetCounters(
				$binding->getEntityTypeId(),
				$affectedTypeIds,
				$entityData['assignedBy'] ?? null,
				$entityData['categoryId'] ?? null,
			);
		}
	}
}

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