• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/rest/controllers/scrum/backlog.php
  • Класс: BitrixTasksRestControllersScrumBacklog
  • Вызов: Backlog::getAction
public function getAction(int $id)
{
	$id = (int) $id;
	if (!$id)
	{
		$this->errorCollection->add([new Error('Group id not found')]);

		return null;
	}

	$backlogService = new BacklogService();

	$backlog = $backlogService->getBacklogByGroupId($id);

	if ($backlog->isEmpty())
	{
		$this->errorCollection->add([new Error('Backlog not found')]);

		return null;
	}

	if (!$this->checkAccess($backlog->getGroupId()))
	{
		$this->errorCollection->add([new Error('Access denied')]);

		return null;
	}

	return [
		'id' => $backlog->getId(),
		'groupId' => $backlog->getGroupId(),
		'createdBy' => $backlog->getCreatedBy(),
		'modifiedBy' => $backlog->getModifiedBy(),
	];
}