• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/scrum/service/entityservice.php
  • Класс: BitrixTasksScrumServiceEntityService
  • Вызов: EntityService::getList
public function getList(
	PageNavigation $nav = null,
	$filter = [],
	$select = [],
	$order = []
): ?QueryResult
{
	try
	{
		if ($this->userId && !Loader::includeModule('socialnetwork'))
		{
			$this->errorCollection->setError(
				new Error(
					'Unable to load socialnetwork.',
					self::ERROR_COULD_NOT_GET_LIST_READ_ENTITY
				)
			);

			return null;
		}

		$query = new QueryQuery(EntityTable::getEntity());

		if (empty($select))
		{
			$select = ['*'];
		}
		$query->setSelect($select);
		$query->setFilter($filter);
		$query->setOrder($order);

		if ($nav)
		{
			$query->setOffset($nav->getOffset());
			$query->setLimit($nav->getLimit() + 1);
		}

		if ($this->userId)
		{
			$query->registerRuntimeField(
				'UG',
				new ReferenceField(
					'UG',
					UserToGroupTable::getEntity(),
					Join::on('this.GROUP_ID', 'ref.GROUP_ID')->where('ref.USER_ID', $this->userId),
					['join_type' => 'inner']
				)
			);
		}

		$queryResult = $query->exec();

		return $queryResult;
	}
	catch (Exception $exception)
	{
		$this->errorCollection->setError(
			new Error(
				$exception->getMessage(),
				self::ERROR_COULD_NOT_GET_LIST_READ_ENTITY
			)
		);

		return null;
	}
}