• Модуль: timeman
  • Путь к файлу: ~/bitrix/modules/timeman/lib/repository/schedule/shiftplanrepository.php
  • Класс: BitrixTimemanRepositoryScheduleShiftPlanRepository
  • Вызов: ShiftPlanRepository::findUserIdsByShiftIds
public function findUserIdsByShiftIds($shiftIds)
{
	if (empty($shiftIds))
	{
		return [];
	}
	$result = $this->buildAllActiveQuery(
		['D_USER_ID'],
		Query::filter()
			->whereIn('SHIFT_ID', $shiftIds)
	)
		->registerRuntimeField(new ExpressionField('D_USER_ID', 'DISTINCT USER_ID'))
		->exec()
		->fetchAll();
	if (empty($result))
	{
		return [];
	}
	return array_map('intval', array_column($result, 'D_USER_ID'));
}