Browse Source

Merge branch 'develop'

develop
Fabien Normand 3 years ago
parent
commit
adc8301b9f
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      Controller/AbstractAdminController.php

+ 7
- 1
Controller/AbstractAdminController.php View File

); );


$queryBuilder = $this->createSortQueryBuilder($context->getSearch(), $context->getEntity(), $fields, $filters); $queryBuilder = $this->createSortQueryBuilder($context->getSearch(), $context->getEntity(), $fields, $filters);
dump($queryBuilder);
$paginator = $this->get(PaginatorFactory::class)->create($queryBuilder); $paginator = $this->get(PaginatorFactory::class)->create($queryBuilder);


$entities = $this->get(EntityFactory::class)->createCollection($context->getEntity(), $paginator->getResults()); $entities = $this->get(EntityFactory::class)->createCollection($context->getEntity(), $paginator->getResults());
FieldCollection $fields, FieldCollection $fields,
FilterCollection $filters FilterCollection $filters
): RepositoryQueryInterface { ): 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( public function createIndexQueryBuilder(
SearchDto $searchDto, SearchDto $searchDto,

Loading…
Cancel
Save