|
|
@@ -6,12 +6,16 @@ namespace App\Repository\Education;
|
|
|
use App\Entity\Education\EducationNotation;
|
|
|
use App\Entity\Organization\Organization;
|
|
|
use App\Filter\Doctrine\TimeConstraint\ActivityYearFilter;
|
|
|
+use App\Service\Doctrine\FiltersConfigurationService;
|
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
|
|
class EducationNotationRepository extends ServiceEntityRepository
|
|
|
{
|
|
|
- public function __construct(ManagerRegistry $registry)
|
|
|
+ public function __construct(
|
|
|
+ ManagerRegistry $registry,
|
|
|
+ private FiltersConfigurationService $filtersConfigurationService
|
|
|
+ )
|
|
|
{
|
|
|
parent::__construct($registry, EducationNotation::class);
|
|
|
}
|
|
|
@@ -22,9 +26,7 @@ class EducationNotationRepository extends ServiceEntityRepository
|
|
|
* @return array|int|mixed|string
|
|
|
*/
|
|
|
public function findAllEducationNotation(Organization $organization){
|
|
|
- /** @var ActivityYearFilter $filter */
|
|
|
- $filter = $this->_em->getFilters()->getFilter('activity_year_filter');
|
|
|
- $filter->setDisabled(true);
|
|
|
+ $this->filtersConfigurationService->suspendTimeConstraintFilters();
|
|
|
|
|
|
$queryBuilder = $this->createQueryBuilder('education_notation');
|
|
|
$queryBuilder
|
|
|
@@ -39,8 +41,8 @@ class EducationNotationRepository extends ServiceEntityRepository
|
|
|
$query = $queryBuilder->getQuery();
|
|
|
$results = $query->getResult();
|
|
|
|
|
|
- $filter->setDisabled(false);
|
|
|
+ $this->filtersConfigurationService->restoreTimeConstraintFilters();
|
|
|
|
|
|
return $results;
|
|
|
}
|
|
|
-}
|
|
|
+}
|