|
|
@@ -15,6 +15,7 @@ use Lc\PietroBundle\Repository\ProjectBoost\ProjectBoostStore; |
|
|
|
use Lc\PietroBundle\Repository\ProjectInspiring\ProjectInspiringStore; |
|
|
|
use Lc\PietroBundle\Repository\Revolt\RevoltStore; |
|
|
|
use Lc\PietroBundle\Controller\AbstractAdminController; |
|
|
|
use Lc\SovBundle\Repository\RepositoryQueryInterface; |
|
|
|
use Symfony\Component\HttpFoundation\Request; |
|
|
|
use Lc\SovBundle\Generator\CsvGenerator; |
|
|
|
|
|
|
@@ -49,24 +50,29 @@ abstract class IndividualDataAdminController extends AbstractAdminController |
|
|
|
->getFields($pageName); |
|
|
|
} |
|
|
|
|
|
|
|
public function createIndexQueryBuilder( |
|
|
|
public function getRepositoryQuery(): RepositoryQueryInterface |
|
|
|
{ |
|
|
|
return $this->getIndividualDataContainer()->getRepositoryQuery(); |
|
|
|
} |
|
|
|
|
|
|
|
public function createIndexRepositoryQuery( |
|
|
|
SearchDto $searchDto, |
|
|
|
EntityDto $entityDto, |
|
|
|
FieldCollection $fields, |
|
|
|
FilterCollection $filters |
|
|
|
): QueryBuilder { |
|
|
|
$queryBuilder = parent::createIndexQueryBuilder( |
|
|
|
): RepositoryQueryInterface { |
|
|
|
return parent::createIndexRepositoryQuery( |
|
|
|
$searchDto, |
|
|
|
$entityDto, |
|
|
|
$fields, |
|
|
|
$filters |
|
|
|
); |
|
|
|
|
|
|
|
$repositoryQuery = parent::createIndexRepositoryQuery($searchDto, $entityDto, $fields, $filters); |
|
|
|
if ($searchDto->getRequest()->get('status')) { |
|
|
|
$queryBuilder->andWhere('entity.status = ' . $searchDto->getRequest()->get('status')); |
|
|
|
$repositoryQuery->filterByStatus($searchDto->getRequest()->get('status')); |
|
|
|
} |
|
|
|
|
|
|
|
return $queryBuilder; |
|
|
|
return $repositoryQuery; |
|
|
|
} |
|
|
|
|
|
|
|
public function configureActions(Actions $actions): Actions |