src/Controller/AdminControllerTrait.php
protected function createListQueryBuilder($entityClass, $sortDirection, $sortField = null, $dqlFilter = null)
    {
        return $this->get('easyadmin.query_builder')->createListQueryBuilder($this->entity, $sortField, $sortDirection, $dqlFilter);
    }
protected function createListQueryBuilder($entityClass, $sortDirection, $sortField = null, $dqlFilter = null)
    {
        return $this->get('easyadmin.query_builder')->createListQueryBuilder($this->entity, $sortField, $sortDirection, $dqlFilter);
    }
Creates Query Builder instance for all the records.

@param string      $entityClass
@param string      $sortDirection
@param string|null $sortField
@param string|null $dqlFilter

@return QueryBuilder The Query Builder instance