|
|
@@ -245,6 +245,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
); |
|
|
|
|
|
|
|
$queryBuilder = $this->createSortQueryBuilder($context->getSearch(), $context->getEntity(), $fields, $filters); |
|
|
|
dump($queryBuilder); |
|
|
|
$paginator = $this->get(PaginatorFactory::class)->create($queryBuilder); |
|
|
|
|
|
|
|
$entities = $this->get(EntityFactory::class)->createCollection($context->getEntity(), $paginator->getResults()); |
|
|
@@ -407,7 +408,12 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
FieldCollection $fields, |
|
|
|
FilterCollection $filters |
|
|
|
): RepositoryQueryInterface { |
|
|
|
return $this->createIndexRepositoryQuery($searchDto,$entityDto, $fields, $filters); |
|
|
|
$repositoryQuery = $this->createIndexRepositoryQuery($searchDto,$entityDto, $fields, $filters); |
|
|
|
if($this->isInstanceOf(StatusInterface::class)) { |
|
|
|
$repositoryQuery->filterIsOnline(); |
|
|
|
} |
|
|
|
$repositoryQuery->orderBy('position', 'asc'); |
|
|
|
return $repositoryQuery; |
|
|
|
} |
|
|
|
public function createIndexQueryBuilder( |
|
|
|
SearchDto $searchDto, |