• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/epicservice.php
  • Класс: BitrixTasksScrumServiceEpicService
  • Вызов: EpicService::getEpics
public function getEpics(int $groupId): array
{
	try
	{
		if (isset(self::$allEpics[$groupId]))
		{
			return self::$allEpics[$groupId];
		}

		self::$allEpics[$groupId] = [];

		$queryObject = EpicTable::getList([
			'filter' => ['GROUP_ID'=> $groupId],
			'order' => ['ID' => 'DESC'],
		]);
		foreach ($queryObject->fetchAll() as $data)
		{
			$epic = new EpicForm();

			$epic->fillFromDatabase($data);

			self::$allEpics[$groupId][$epic->getId()] = $epic->toArray();
		}

		return self::$allEpics[$groupId];
	}
	catch (Exception $exception)
	{
		$this->errorCollection->setError(
			new Error(
				$exception->getMessage(),
				self::ERROR_COULD_NOT_GET_EPICS
			)
		);

		return [];
	}
}