Task::getAccessibleGroupTasksQuery

  1. Bitrix24 API (v. 23.675.0)
  2. tasks
  3. Task
  4. getAccessibleGroupTasksQuery
  • Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/internals/runtime/task.php
  • Класс: BitrixTasksInternalsRunTimeTask
  • Вызов: Task::getAccessibleGroupTasksQuery
static function getAccessibleGroupTasksQuery($parameters, $filter, $runtimeOptions)
{
	$allowedGroups = static::getAllowedGroups($parameters);

	if (!empty($allowedGroups))
	{
		// todo: possible bottleneck here, in case of having lots of groups. refactor it when group access check is available on sql
		$groupFilter = $filter;
		$groupFilter['GROUP_ID'] = $allowedGroups;

		$query = new EntityQuery(TaskTable::getEntity());
		$query->setSelect(['TASK_ID' => 'ID']);
		$query->setFilter($groupFilter);

		$query = static::setRuntimeOptionsForQuery($runtimeOptions, $query);

		return $query->getQuery();
	}

	return '';
}

Добавить комментарий