• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/checklistitem.php
  • Класс: CTaskCheckListItem
  • Вызов: CTaskCheckListItem::fetchListFromDb
static function fetchListFromDb($taskData, $order = ['SORT_INDEX' => 'asc', 'ID' => 'asc'])
{
	$taskId = $taskData['ID'];

	CTaskAssert::assertLaxIntegers($taskId);

	if (!isset($order) || !is_array($order))
	{
		$order = ['SORT_INDEX' => 'asc', 'ID' => 'asc'];
	}

	/** @noinspection PhpDeprecationInspection */
	if (is_array($order) && !empty($order) && !self::checkFieldsForSort($order))
	{
		/** @noinspection PhpDeprecationInspection */
		throw new TasksException('', TasksException::TE_WRONG_ARGUMENTS);
	}

	$items = TaskCheckListFacade::getList([], ['TASK_ID' => $taskId], $order);

	/** @noinspection PhpUndefinedClassInspection */
	$dbResult = new CDBResult();
	$dbResult->InitFromArray($items);

	return [$items, $dbResult];
}