- Модуль: timeman
- Путь к файлу: ~/bitrix/modules/timeman/lib/repository/schedule/schedulerepository.php
- Класс: BitrixTimemanRepositoryScheduleScheduleRepository
- Вызов: ScheduleRepository::updateBatchAssignments
private function updateBatchAssignments($assignIds, $scheduleId, $excluded, $assignClassName, $assignName)
{
$assignIds = $this->convertEachToInt($assignIds);
$scheduleId = (int)$scheduleId;
$excluded = (int)$excluded;
if (empty($assignIds) || $scheduleId <= 0)
{
return new Result();
}
$primaries = [];
foreach ($assignIds as $assignId)
{
$primaries[] = [
'SCHEDULE_ID' => $scheduleId,
$assignName => (int)$assignId,
];
}
/** @var ScheduleUserTable|DepartmentScheduleDepartmentTable $assignClassName */
return $assignClassName::updateMulti($primaries, ['STATUS' => $excluded], true);
}