• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/queue/event.php
  • Класс: BitrixImOpenLinesQueueEvent
  • Вызов: Event::getLineIsDepartmentQueue
static function getLineIsDepartmentQueue($departments, $recursion = true)
{
	$result = [];

	$fullDepartments = self::getParentDepartments($departments, $recursion);

	if($fullDepartments)
	{
		$queueListManager = ConfigQueueTable::getList(
			[
				'select' => ['CONFIG_ID'],
				'filter' => [
					'ENTITY_TYPE' => 'department',
					'ENTITY_ID' => array_keys($fullDepartments)
				],
				'order' => [
					'SORT' => 'ASC',
					'ID' => 'ASC'
				]
			]
		);

		while ($queue = $queueListManager->fetch())
		{
			$result[$queue['CONFIG_ID']] = $queue['CONFIG_ID'];
		}
	}

	return $result;
}