• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/queue/event.php
  • Класс: BitrixImOpenLinesQueueEvent
  • Вызов: Event::OnEndAbsence
static function OnEndAbsence(BitrixMainEvent $event)
{
	$eventData = $event->getParameters();

	if(
		!empty($eventData['USER_ID']) &&
		!empty($eventData['ABSENCE_TYPE'])
	)
	{
		$isVacation = true;

		if(
			Loader::includeModule('intranet') &&
			!UserAbsence::isVacation($eventData['ABSENCE_TYPE'])
		)
		{
			$isVacation = false;
		}

		if (
			$isVacation === true &&
			ImOpenLinesQueue::isRealOperator($eventData['USER_ID'])
		)
		{
			self::returnUserToAllQueues($eventData['USER_ID']);
		}

		ImOpenLinesDebug::addQueueEvent( __METHOD__, 0, 0, ['eventData' => $eventData]);
	}
}