• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/countersprocessorhomeostasis.php
  • Класс: for
  • Вызов: for::injectMarker
static function injectMarker($arFilter, $curSection, $counterId, $userId)
{
	static $arMonitoredCounters = array(
		CTaskCountersProcessor::COUNTER_TASKS_MY_NEW,
		CTaskCountersProcessor::COUNTER_TASKS_ACCOMPLICE_NEW,

		CTaskCountersProcessor::COUNTER_TASKS_MY_WO_DEADLINE,
		CTaskCountersProcessor::COUNTER_TASKS_ORIGINATOR_WO_DEADLINE,
		CTaskCountersProcessor::COUNTER_TASKS_ORIGINATOR_WAIT_CTRL,
		
		// monitor all expired
		CTaskCountersProcessor::COUNTER_TASKS_MY_EXPIRED,
		CTaskCountersProcessor::COUNTER_TASKS_ACCOMPLICE_EXPIRED,
		CTaskCountersProcessor::COUNTER_TASKS_AUDITOR_EXPIRED,
		CTaskCountersProcessor::COUNTER_TASKS_ORIGINATOR_EXPIRED,

		// monitor all almost expired
		CTaskCountersProcessor::COUNTER_TASKS_MY_EXPIRED_CANDIDATES,
		CTaskCountersProcessor::COUNTER_TASKS_ACCOMPLICE_EXPIRED_CANDIDATES
	);

	if (
		($curSection === CTaskListState::VIEW_SECTION_ROLES)
		&& ($counterId !== null)
		&& ($userId > 0)
		&& in_array($counterId, $arMonitoredCounters, true)
	)
	{
		// We monitor only some counters (except expiration counters)
		$filterCheksum = self::calcFilterChecksum($arFilter);

		if ( ! isset($arFilter['::MARKERS']) )
			$arFilter['::MARKERS'] = array();

		$arFilter['::MARKERS'][self::MARKER_ID] = array(
			'filterCheksum' => $filterCheksum,
			'counterId'     => $counterId,
			'userId'        => $userId
		);
	}

	return ($arFilter);
}