mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
Update initiateQuery method to include ExportGenerationContext
The `initiateQuery` method now consistently incorporates the `ExportGenerationContext` parameter across various export classes, improving functionality and standardization. This change ensures compatibility and alignment with the expected method signature.
This commit is contained in:
@@ -100,7 +100,7 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod implements ExportInt
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -100,7 +100,7 @@ class AvgDurationAPWorkPersonAssociatedOnWork implements ExportInterface, Groupe
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -112,7 +112,7 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -108,7 +108,7 @@ class CountAccompanyingCourseStepHistory implements ExportInterface, GroupedExpo
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -108,7 +108,7 @@ class CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -108,7 +108,7 @@ class CountAccompanyingPeriodWorkAssociatePersonOnWork implements ExportInterfac
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -104,7 +104,7 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -123,7 +123,7 @@ class CountHouseholdInPeriod implements ExportInterface, GroupedExportInterface
|
||||
return Declarations::HOUSEHOLD_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -108,10 +108,8 @@ class CountPerson implements ExportInterface, GroupedExportInterface
|
||||
|
||||
/**
|
||||
* Initiate the query.
|
||||
*
|
||||
* @return QueryBuilder
|
||||
*/
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -108,7 +108,7 @@ class CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork implements Export
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -110,7 +110,7 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
|
||||
return Declarations::HOUSEHOLD_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -94,7 +94,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
|
||||
return $this->listAccompanyingPeriodHelper->getQueryKeys($data);
|
||||
}
|
||||
|
||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
||||
public function getResult($query, $data, ExportGenerationContext $context)
|
||||
{
|
||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
||||
}
|
||||
@@ -109,7 +109,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
|
||||
return Declarations::PERSON_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [], ExportGenerationContext $context)
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$qb = $this->entityManager->createQueryBuilder();
|
||||
|
||||
|
@@ -198,7 +198,7 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeri
|
||||
return self::FIELDS;
|
||||
}
|
||||
|
||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
||||
public function getResult($query, $data, ExportGenerationContext $context)
|
||||
{
|
||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeri
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context)
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
$calcDate = $data['calc_date'] ?? new RollingDate(RollingDate::T_TODAY);
|
||||
|
@@ -198,7 +198,7 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements
|
||||
return self::FIELDS;
|
||||
}
|
||||
|
||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
||||
public function getResult($query, $data, ExportGenerationContext $context)
|
||||
{
|
||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements
|
||||
return Declarations::SOCIAL_WORK_ACTION_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context)
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
$calcDate = $data['calc_date'] ?? new RollingDate(RollingDate::T_TODAY);
|
||||
|
@@ -186,7 +186,7 @@ final readonly class ListEvaluation implements ListInterface, GroupedExportInter
|
||||
return self::FIELDS;
|
||||
}
|
||||
|
||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
||||
public function getResult($query, $data, ExportGenerationContext $context)
|
||||
{
|
||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ final readonly class ListEvaluation implements ListInterface, GroupedExportInter
|
||||
return Declarations::EVAL_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context)
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
$calcDate = $data['calc_date'] ?? new RollingDate(RollingDate::T_TODAY);
|
||||
|
@@ -144,7 +144,7 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface
|
||||
return Declarations::HOUSEHOLD_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -131,7 +131,7 @@ class ListPerson implements ListInterface, GroupedExportInterface
|
||||
/**
|
||||
* param array{fields: string[], address_date: DateTimeImmutable} $data.
|
||||
*/
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -119,7 +119,7 @@ final readonly class ListPersonHavingAccompanyingPeriod implements ListInterface
|
||||
/**
|
||||
* param array{fields: string[], address_date: DateTimeImmutable} $data.
|
||||
*/
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = [])
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -104,7 +104,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
|
||||
);
|
||||
}
|
||||
|
||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
||||
public function getResult($query, $data, ExportGenerationContext $context)
|
||||
{
|
||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
|
||||
/**
|
||||
* param array{fields: string[], address_date: DateTimeImmutable} $data.
|
||||
*/
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context)
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, ExportGenerationContext $context): \Doctrine\ORM\QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
@@ -127,7 +127,7 @@ final readonly class StatAccompanyingCourseDuration implements ExportInterface,
|
||||
return Declarations::ACP_TYPE;
|
||||
}
|
||||
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data, \Chill\MainBundle\Export\ExportGenerationContext $context): QueryBuilder
|
||||
{
|
||||
$centers = array_map(static fn ($el) => $el['center'], $acl);
|
||||
|
||||
|
Reference in New Issue
Block a user