diff --git a/docs/source/_static/code/exports/BirthdateFilter.php b/docs/source/_static/code/exports/BirthdateFilter.php index 71ea6032d..2bccd766d 100644 --- a/docs/source/_static/code/exports/BirthdateFilter.php +++ b/docs/source/_static/code/exports/BirthdateFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use DateTime; use Doctrine\ORM\Query\Expr; @@ -94,7 +95,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac // here, we create a simple string which will describe the action of // the filter in the Response - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s birtdate: ' . 'between %date_from% and %date_to%', [ diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php index 26e97bf06..575fe3aa2 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php @@ -14,6 +14,7 @@ namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Entity\ActivityType; use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; @@ -117,7 +118,7 @@ final readonly class ActivityTypeFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $types = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php index 436eb8099..d38818834 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Form\Type\PickSocialActionType; @@ -75,7 +76,7 @@ class BySocialActionFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $actions = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php index ef538c459..b79c094cf 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Form\Type\PickSocialIssueType; @@ -75,7 +76,7 @@ class BySocialIssueFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $issues = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php index 242addf3b..1aa9f57a9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Entity\Activity; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; @@ -68,7 +69,7 @@ class HasNoActivityFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered acp which has no activities', []]; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php index bba364d1a..01b961304 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter\ACPFilters; use Chill\ActivityBundle\Entity\Activity; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -64,7 +65,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.activity.course_having_activity_between_date.Only course having an activity between from and to', diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index e0650140d..1604da54a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -92,7 +93,7 @@ class ActivityDateFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'Filtered by date of activity: only between %date_from% and %date_to%', diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php index b88970323..0f2352414 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php @@ -14,6 +14,7 @@ namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Entity\ActivityPresence; use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityPresenceRepositoryInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Doctrine\Common\Collections\Collection; @@ -69,7 +70,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $presences = array_map( fn (ActivityPresence $presence) => $this->translatableStringHelper->localize($presence->getName()), diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php index 4a8d93f8f..158865fea 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php @@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\ActivityType; use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityTypeRepositoryInterface; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Doctrine\ORM\QueryBuilder; @@ -92,7 +93,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter return []; } - public function describeAction($data): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context): string|\Symfony\Contracts\Translation\TranslatableInterface|array { // collect all the reasons'name used in this filter in one array $reasonsNames = array_map( diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php index 5ec11f51f..235175978 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Repository\UserRepositoryInterface; @@ -75,7 +76,7 @@ final readonly class ActivityUsersFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $users = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php index 982f36d67..204182da9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Repository\UserRepositoryInterface; @@ -71,7 +72,7 @@ class ByCreatorFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php index 227a2bd07..1e60eca44 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php @@ -14,6 +14,7 @@ namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -106,7 +107,7 @@ final readonly class CreatorJobFilter implements FilterInterface return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $jobs = array_map( fn (UserJob $job) => $this->translatableStringHelper->localize($job->getLabel()), diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php index e3a291b42..d29c12538 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php @@ -14,6 +14,7 @@ namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -102,7 +103,7 @@ class CreatorScopeFilter implements FilterInterface return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $scopes = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php index bf40a6e57..90eee83ab 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; @@ -86,7 +87,7 @@ class EmergencyFilter implements FilterInterface return ['accepted_emergency' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'Filtered by emergency: only %emergency%', [ diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php index 7490759d1..74f0d021e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserLocationType; use Chill\MainBundle\Repository\LocationRepository; @@ -73,7 +74,7 @@ final readonly class LocationFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $locations = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php index 3e3435f85..7cb0688fb 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickLocationTypeType; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -80,7 +81,7 @@ class LocationTypeFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $types = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php index b03d4c627..e561eed34 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php @@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\ActivityReason; use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityReasonRepository; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Doctrine\Common\Collections\Collection; @@ -92,7 +93,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { // collect all the reasons'name used in this filter in one array $reasonsNames = array_map( diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php index f5dfe4c99..ec2580c25 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php @@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Entity\ActivityReason; use Chill\ActivityBundle\Repository\ActivityReasonRepository; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -140,7 +141,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ [] === $data['reasons'] ? diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php index b72c7fa39..fc14e1c20 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php @@ -13,6 +13,7 @@ namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Tests\Export\Filter\PersonsFilterTest; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Form\Type\PickPersonDynamicType; use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; @@ -82,7 +83,7 @@ final readonly class PersonsFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $users = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php index b3c120275..a8a9cd0ff 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php @@ -13,6 +13,7 @@ namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; @@ -88,7 +89,7 @@ class SentReceivedFilter implements FilterInterface return ['accepted_sentreceived' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $sentreceived = array_flip(self::CHOICES)[$data['accepted_sentreceived']]; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php index 4844aa219..a79096d31 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\ActivityBundle\Export\Filter; use Chill\ActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Repository\UserRepositoryInterface; @@ -80,7 +81,7 @@ final readonly class UserFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php index a067c9708..1eed2f50a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php @@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; @@ -93,7 +94,7 @@ class UsersJobFilter implements FilterInterface return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.activity.by_users_job.Filtered activity by users job: only %jobs%', [ '%jobs%' => implode( diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php index a2f0cae79..ba569bf41 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php @@ -15,6 +15,7 @@ use Chill\ActivityBundle\Entity\Activity; use Chill\ActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; @@ -93,7 +94,7 @@ class UsersScopeFilter implements FilterInterface return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['export.filter.activity.by_users_scope.Filtered activity by users scope: only %scopes%', [ '%scopes%' => implode( diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php index cd5fa65ac..265287fe2 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php @@ -15,6 +15,7 @@ use Chill\AsideActivityBundle\Entity\AsideActivityCategory; use Chill\AsideActivityBundle\Export\Declarations; use Chill\AsideActivityBundle\Repository\AsideActivityCategoryRepository; use Chill\AsideActivityBundle\Templating\Entity\CategoryRender; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Doctrine\Common\Collections\Collection; @@ -91,7 +92,7 @@ class ByActivityTypeFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $types = array_map( fn (AsideActivityCategory $t): string => $this->translatableStringHelper->localize($t->getTitle()), diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php index 48c1f359b..c1a5fb338 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\AsideActivityBundle\Export\Filter; use Chill\AsideActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -87,7 +88,7 @@ class ByDateFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['export.filter.Filtered by aside activities between %dateFrom% and %dateTo%', [ '%dateFrom%' => $this->rollingDateConverter->convert($data['date_from'])->format('d-m-Y'), diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php index 6bc98d64d..0a29de598 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php @@ -14,6 +14,7 @@ namespace Chill\AsideActivityBundle\Export\Filter; use Chill\AsideActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserLocationType; use Chill\MainBundle\Repository\LocationRepository; @@ -72,7 +73,7 @@ final readonly class ByLocationFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $extractFunction = fn (Location $l): string => $l->getName(); if ($data['locations'] instanceof Collection) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php index 1db98a9af..684105679 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\AsideActivityBundle\Export\Filter; use Chill\AsideActivityBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Repository\UserRepository; @@ -72,7 +73,7 @@ final readonly class ByUserFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php index 6ae67501e..f7bb9a113 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php @@ -15,6 +15,7 @@ use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; @@ -93,7 +94,7 @@ class ByUserJobFilter implements FilterInterface return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['export.filter.by_user_job.Filtered aside activities by user jobs: only %jobs%', [ '%jobs%' => implode( diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php index 500e1ecfa..09f421079 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php @@ -15,6 +15,7 @@ use Chill\AsideActivityBundle\Entity\AsideActivity; use Chill\AsideActivityBundle\Export\Declarations; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; @@ -93,7 +94,7 @@ class ByUserScopeFilter implements FilterInterface return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.by_user_scope.Filtered aside activities by user scope: only %scopes%', [ '%scopes%' => implode( diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php index ee2bdd499..8c3774435 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php @@ -13,6 +13,7 @@ namespace Chill\CalendarBundle\Export\Filter; use Chill\CalendarBundle\Export\Declarations; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserRepositoryInterface; use Chill\MainBundle\Templating\Entity\UserRender; @@ -82,7 +83,7 @@ final readonly class AgentFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php index 5998c7a7a..2cfb251c0 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\CalendarBundle\Export\Filter; use Chill\CalendarBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -79,7 +80,7 @@ class BetweenDatesFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by calendars between %dateFrom% and %dateTo%', [ '%dateFrom%' => $this->rollingDateConverter->convert($data['date_from'])->format('d-m-Y'), diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php index 7c8dd6572..455ba1445 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php @@ -19,6 +19,7 @@ declare(strict_types=1); namespace Chill\CalendarBundle\Export\Filter; use Chill\CalendarBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -86,7 +87,7 @@ class CalendarRangeFilter implements FilterInterface return ['hasCalendarRange' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $choice = ''; diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php index 4067a1e90..698dab78b 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -14,6 +14,7 @@ namespace Chill\CalendarBundle\Export\Filter; use Chill\CalendarBundle\Export\Declarations; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -100,7 +101,7 @@ final readonly class JobFilter implements FilterInterface return ['job' => $this->denormalizeDoctrineEntity($formData['job'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $userJobs = []; diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php index e9a2ddfc6..7292d8543 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -14,6 +14,7 @@ namespace Chill\CalendarBundle\Export\Filter; use Chill\CalendarBundle\Export\Declarations; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -102,7 +103,7 @@ class ScopeFilter implements FilterInterface return ['scope' => $this->denormalizeDoctrineEntity($formData['scope'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $scopes = []; diff --git a/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php index 63cfa2776..0017f3dac 100644 --- a/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php +++ b/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\EventBundle\Export\Filter; use Chill\EventBundle\Export\Declarations; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -92,7 +93,7 @@ class EventDateFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'Filtered by date of event: only between %date_from% and %date_to%', diff --git a/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php index 78eaa3936..236ee12c3 100644 --- a/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php +++ b/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php @@ -15,6 +15,7 @@ use Chill\EventBundle\Entity\EventType; use Chill\EventBundle\Export\Declarations; use Chill\EventBundle\Repository\EventTypeRepository; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Doctrine\ORM\QueryBuilder; @@ -83,7 +84,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $typeNames = array_map( fn (EventType $t): string => $this->translatableStringHelper->localize($t->getName()), diff --git a/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php index d40374320..28fe9cc18 100644 --- a/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php +++ b/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php @@ -15,6 +15,7 @@ use Chill\EventBundle\Entity\Role; use Chill\EventBundle\Export\Declarations; use Chill\EventBundle\Repository\RoleRepository; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Doctrine\ORM\QueryBuilder; @@ -83,7 +84,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $roleNames = array_map( fn (Role $r): string => $this->translatableStringHelper->localize($r->getName()), diff --git a/src/Bundle/ChillMainBundle/Export/FilterInterface.php b/src/Bundle/ChillMainBundle/Export/FilterInterface.php index 438597ce1..bfe0aecda 100644 --- a/src/Bundle/ChillMainBundle/Export/FilterInterface.php +++ b/src/Bundle/ChillMainBundle/Export/FilterInterface.php @@ -81,8 +81,9 @@ interface FilterInterface extends ModifierInterface * Example: `array('my string with %parameter%', ['%parameter%' => 'good news'], 'mydomain', 'mylocale')` * * @param D $data + * @param ExportGenerationContext $context * * @return array|string|TranslatableInterface a string with the data or, if translatable, an array where first element is string, second elements is an array of arguments */ - public function describeAction(array $data): array|string|TranslatableInterface; + public function describeAction(array $data, ExportGenerationContext $context): array|string|TranslatableInterface; } diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index 8abfdc733..7d42ef5c3 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -14,6 +14,7 @@ namespace Chill\MainBundle\Tests\Export; use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Export\AggregatorInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\ExportInterface; use Chill\MainBundle\Export\ExportManager; use Chill\MainBundle\Export\FilterInterface; @@ -390,7 +391,7 @@ class DummyFilterWithApplying implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['dummy filter', []]; } diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php index 4b1c8d8cf..7fcd3c9f4 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\MainBundle\Tests\Export; use Chill\MainBundle\Export\AggregatorInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\ExportManager; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Export\SortExportElement; @@ -207,7 +208,7 @@ class SortExportElementTest extends KernelTestCase return []; } - public function describeAction($data, $format = 'string'): string|TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|TranslatableInterface|array { return ['a', []]; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php index b2f5390ee..9056e3034 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -85,7 +86,7 @@ class ActiveOnDateFilter implements FilterInterface return ['on_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by actives courses: active on %ondate%', [ '%ondate%' => $this->rollingDateConverter->convert($data['on_date'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php index fb06f3913..0ac25d6a1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -75,7 +76,7 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by actives courses: at least one day between %datefrom% and %dateto%', [ '%datefrom%' => $this->rollingDateConverter->convert($data['date_from'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 605aecc15..b761b3275 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserLocationType; use Chill\MainBundle\Repository\LocationTypeRepository; @@ -71,7 +72,7 @@ final readonly class AdministrativeLocationFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $locations = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php index a49f2f838..d7ad4169b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive; @@ -82,7 +83,7 @@ final readonly class ClosingMotiveFilter implements FilterInterface return []; } - public function describeAction($data): array + public function describeAction($data, ExportGenerationContext $context): array { $motives = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php index cecef6526..a6e4debd1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\Query\Expr\Andx; @@ -85,7 +86,7 @@ class ConfidentialFilter implements FilterInterface return ['accepted_confidentials' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'Filtered by confidential: only %confidential%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php index 4f0bfe4f3..26a26dae4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Repository\UserRepositoryInterface; @@ -76,7 +77,7 @@ final readonly class CreatorFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'Filtered by creator: only %creators%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php index 88720573b..0fe38f6ff 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepositoryInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -115,7 +116,7 @@ final readonly class CreatorJobFilter implements FilterInterface return ['creator_job' => $this->denormalizeDoctrineEntity($formData['creator_job'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): TranslatableMessage + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): TranslatableMessage { $creatorJobs = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php index 27cd35a04..bd1c06d62 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\Query\Expr\Andx; @@ -85,7 +86,7 @@ class EmergencyFilter implements FilterInterface return ['accepted_emergency' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'Filtered by emergency: only %emergency%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php index c8eb99df1..92fb337be 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\Evaluation; @@ -87,7 +88,7 @@ final readonly class EvaluationFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $evaluations = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index d043c1f7b..7ddf72ee5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\Address; use Chill\MainBundle\Entity\GeographicalUnit\SimpleGeographicalUnitDTO; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\GeographicalUnitLayerRepositoryInterface; @@ -137,7 +138,7 @@ class GeographicalUnitStatFilter implements FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by geographic unit: computed at %date%, only in %units%', [ '%date%' => $this->rollingDateConverter->convert($data['date_calc'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php index d0cd16a14..b66b75aa9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Chill\ThirdPartyBundle\Entity\ThirdParty; @@ -64,7 +65,7 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface return ['handling_3parties' => []]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.work.by_handling3party.Only 3 parties %3parties%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoActionFilter.php index edaaef066..450a5821b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoActionFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork; use Chill\PersonBundle\Export\Declarations; @@ -59,7 +60,7 @@ class HasNoActionFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered acp which has no actions']; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php index 0f954b5a6..dccbaa6da 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -82,7 +83,7 @@ class HasNoReferrerFilter implements FilterInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered acp which has no referrer on date: %date%', [ '%date%' => $this->rollingDateConverter->convert($data['calc_date'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php index 8644544c3..2f341478b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -93,7 +94,7 @@ class HasTemporaryLocationFilter implements FilterInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return match ($data['having_temporarily']) { true => ['export.filter.course.having_temporarily.Having a temporarily location', []], diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php index 3993495ca..114793342 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -67,7 +68,7 @@ final readonly class HavingAnAccompanyingPeriodInfoWithinDatesFilter implements return 'export.filter.course.having_info_within_interval.title'; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.course.having_info_within_interval.Only course with events between %startDate% and %endDate%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index d6271dff7..38f715acd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\Query\Expr\Andx; @@ -85,7 +86,7 @@ class IntensityFilter implements FilterInterface return ['accepted_intensities' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'Filtered by intensity: only %intensity%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php index 72007eb98..9de823cff 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\UserJobRepositoryInterface; @@ -121,7 +122,7 @@ readonly class JobWorkingOnCourseFilter implements FilterInterface return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository), 'start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.course.by_job_working.Filtered by job working on course: only %jobs%, between %start_date% and %end_date%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php index 120a1b385..8b84709fe 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\Address; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -62,7 +63,7 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.course.not_having_address_reference.describe', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php index 7125b3c09..c4ed0c5bd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -73,7 +74,7 @@ class OpenBetweenDatesFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_MONTH_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by opening dates: between %datefrom% and %dateto%', [ '%datefrom%' => $this->rollingDateConverter->convert($data['date_from'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php index 9fa553c82..11439900b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\AccompanyingPeriod\Origin; @@ -82,7 +83,7 @@ final readonly class OriginFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $origins = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 4d49f632e..c21f448aa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\UserRepositoryInterface; @@ -98,7 +99,7 @@ final readonly class ReferrerFilter implements FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY), 'accepted_referrers' => []]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php index 880e5fdd1..87fd7573e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Form\Type\PickUserDynamicType; @@ -117,7 +118,7 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php index 5ef2534c1..084dd45cf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\EntityManagerInterface; @@ -137,7 +138,7 @@ final readonly class RequestorFilter implements FilterInterface return ['accepted_choices' => self::DEFAULT_CHOICE]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $choice = array_flip(self::REQUESTOR_CHOICES)[$data['accepted_choices']]; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php index b778fbaed..d8b3b2e6e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\ScopeRepositoryInterface; @@ -116,7 +117,7 @@ readonly class ScopeWorkingOnCourseFilter implements FilterInterface return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository), 'start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.course.by_scope_working.Filtered by scope working on course: only %scopes%, between %start_date% and %end_date%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index 78abb176f..30683a53f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; @@ -138,7 +139,7 @@ final readonly class SocialActionFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $actions = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php index e5f90e243..05309aaad 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Export\Declarations; @@ -89,7 +90,7 @@ class SocialIssueFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $issues = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php index dc8be8818..3434ed600 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -112,7 +113,7 @@ class StepFilterBetweenDates implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $steps = array_map( fn (string $step) => $this->translator->trans(array_flip(self::STEPS)[$step]), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php index 560e12af3..f05708888 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Export\ExportDataNormalizerTrait; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -124,7 +125,7 @@ class StepFilterOnDate implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $steps = array_map( fn (string $step) => $this->translator->trans(array_flip(self::STEPS)[$step]), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php index 1c338171d..28531b01a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php @@ -15,6 +15,7 @@ use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; use Chill\MainBundle\Export\DataTransformerInterface; use Chill\MainBundle\Export\ExportDataNormalizerTrait; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\UserJobRepositoryInterface; @@ -102,7 +103,7 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn ; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.course.by_user_job.Filtered by user job: only job', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php index b800bcde7..928abde49 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php @@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; use Chill\MainBundle\Export\DataTransformerInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\ScopeRepositoryInterface; @@ -112,7 +113,7 @@ final readonly class UserScopeFilter implements FilterInterface, DataTransformer return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository), 'start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.course.by_user_scope.Filtered by user main scope: only scopes', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php index 05fe4dfdc..a53a1e6c4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Form\Type\PickUserDynamicType; @@ -84,7 +85,7 @@ final readonly class UserWorkingOnCourseFilter implements FilterInterface return 'export.filter.course.by_user_working.title'; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.course.by_user_working.Filtered by user working on course: only %users%, between %start_date% and %end_date%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php index 2c4301269..af042e9e7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingPeriodStepHistoryFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -74,7 +75,7 @@ final readonly class ByDateFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.step_history.by_date.description', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php index 0e1dde46b..9d89c5a32 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\AccompanyingPeriodStepHistoryFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; @@ -72,7 +73,7 @@ final readonly class ByStepFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.step_history.by_step.description', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php index ac5c2e0c9..0bbd4c1bc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\EvaluationFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -78,7 +79,7 @@ class ByEndDateFilter implements FilterInterface return ['start_date' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'end_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by end date: between %start_date% and %end_date%', [ '%start_date%' => $this->rollingDateConverter->convert($data['start_date'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php index 6cd3bfc45..8aaad8d2b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\EvaluationFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -78,7 +79,7 @@ class ByStartDateFilter implements FilterInterface return ['start_date' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'end_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by start date: between %start_date% and %end_date%', [ '%start_date%' => $this->rollingDateConverter->convert($data['start_date'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/CurrentEvaluationsFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/CurrentEvaluationsFilter.php index 63a4366b2..68f41b427 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/CurrentEvaluationsFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/CurrentEvaluationsFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\EvaluationFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; @@ -58,7 +59,7 @@ class CurrentEvaluationsFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by current evaluations']; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php index ddb3d222d..8c64aa486 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\EvaluationFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\Evaluation; @@ -80,7 +81,7 @@ final readonly class EvaluationTypeFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $evals = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index 9ec86f44e..1247e7cb6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\EvaluationFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; @@ -77,7 +78,7 @@ class MaxDateFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered by maxdate: only %choice%', [ '%choice%' => $this->translator->trans( diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php index de700660f..e7a5e7ea6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\HouseholdFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -102,7 +103,7 @@ readonly class CompositionFilter implements FilterInterface return ['on_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $compositions = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php index cf33b8afc..d5ed10934 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Entity\Address; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; @@ -98,7 +99,7 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY), 'ref_statuses' => [Address::ADDR_REFERENCE_STATUS_TO_REVIEW]]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.person.by_address_ref_status.Filtered by person\'s address status computed at %datecalc%, only %statuses%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php index a99b17b09..24da1105a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -110,7 +111,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s age: ' .'between %min_age% and %max_age%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php index c1e91e269..184706d47 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -93,7 +94,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s birthdate: ' .'between %date_from% and %date_to%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php index b830cc687..250401309 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -98,7 +99,7 @@ class ByHouseholdCompositionFilter implements FilterInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $compos = array_map( fn (HouseholdCompositionType $compositionType) => $this->translatableStringHelper->localize($compositionType->getLabel()), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php index c21a4c5b2..f43cf3950 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -119,7 +120,7 @@ class DeadOrAliveFilter implements FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by a state of %deadOrAlive%: ' .'at this date %date_calc%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php index fd32aba35..4992f3002 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -93,7 +94,7 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s deathdate: ' .'between %date_from% and %date_to%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php index 6086f3964..75f76edcd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php @@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Entity\Gender; use Chill\MainBundle\Export\DataTransformerInterface; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\GenderRepository; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; @@ -155,7 +156,7 @@ class GenderFilter implements return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $genders = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php index bb9eb1d2a..8a6261a1a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Entity\GeographicalUnit\SimpleGeographicalUnitDTO; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Repository\GeographicalUnitLayerRepositoryInterface; use Chill\MainBundle\Repository\GeographicalUnitRepositoryInterface; @@ -124,7 +125,7 @@ final readonly class GeographicalUnitFilter implements \Chill\MainBundle\Export\ return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.by_geog_unit.Filtered by person\'s geographical unit (based on address) computed at %datecalc%, only %units%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php index eb60d004d..6b105331a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\MaritalStatus; @@ -74,7 +75,7 @@ final readonly class MaritalStatusFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s marital status']; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php index e8c280476..a7e30a8bf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\PersonFilters; use Chill\MainBundle\Entity\Country; use Chill\MainBundle\Export\ExportElementValidatedInterface; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\Select2CountryType; use Chill\MainBundle\Repository\CountryRepository; @@ -83,7 +84,7 @@ final readonly class NationalityFilter implements return []; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $countries = $data['nationalities']; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php index 3083b4c8e..53110e312 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -126,7 +127,7 @@ final readonly class ResidentialAddressAtThirdpartyFilter implements FilterInter return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s who have a residential address located at a thirdparty of type %thirdparty_type% and valid on %date_calc%', [ '%thirdparty_type%' => $this->translatableStringHelper->localize($data['thirdparty_cat'][0]->getName()), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php index ad481d616..66054680d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -98,7 +99,7 @@ class ResidentialAddressAtUserFilter implements FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ["Filtered by person's who have a residential address located at another user"]; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index 3e249181d..ecc6b52d3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -88,7 +89,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.person.with_participation_between_dates.Filtered by participations during period: between %dateafter% and %datebefore%', [ '%dateafter%' => $this->rollingDateConverter->convert($data['date_after'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php index 32a0404d9..c335f58eb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -83,7 +84,7 @@ class WithoutHouseholdComposition implements FilterInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.person.by_no_composition.Persons filtered by no composition at %date%', [ '%date%' => $this->rollingDateConverter->convert($data['calc_date'])->format('d-m-Y'), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php index 1d3dc29b0..55aa9b82f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -90,7 +91,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt ]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['exports.filter.person.without_participation_between_dates.Filtered by having no participations during period: between', [ 'dateafter' => $this->rollingDateConverter->convert($data['date_after']), diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php index 04d2cef5f..0e495147a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -66,7 +67,7 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F return 'export.filter.work.end_between_dates.title'; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.work.end_between_dates.Only where start date is between %startDate% and %endDate%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php index e5b1e17b0..d3339d637 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -66,7 +67,7 @@ final readonly class AccompanyingPeriodWorkStartDateBetweenDateFilter implements return 'export.filter.work.start_between_dates.title'; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.work.start_between_dates.Only where start date is between %startDate% and %endDate%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php index cb7e27ab0..81be76be5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -62,7 +63,7 @@ final readonly class AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter impl return 'export.filter.work.evaluation_between_dates.title'; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.work.evaluation_between_dates.description', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php index 274daed02..3c2fc410d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; use Chill\MainBundle\Entity\User; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Repository\UserRepositoryInterface; @@ -71,7 +72,7 @@ final readonly class CreatorFilter implements FilterInterface return ['creators' => $this->denormalizeDoctrineEntity($formData['creators'], $this->userRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return [ 'export.filter.work.by_creator.Filtered by creator: only %creators%', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php index 94be81a39..5b6bb2a38 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; use Chill\MainBundle\Entity\User\UserJobHistory; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -94,7 +95,7 @@ final readonly class CreatorJobFilter implements FilterInterface return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $creatorJobs = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php index 919d29a3e..74df6af4e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User\UserScopeHistory; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\ScopeRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; @@ -94,7 +95,7 @@ class CreatorScopeFilter implements FilterInterface return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $creatorScopes = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php index 1b764eb3a..c64e4e9fb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CurrentActionFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\QueryBuilder; @@ -58,7 +59,7 @@ class CurrentActionFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { return ['Filtered actions without end date']; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index 82f7aefb5..5391e842b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\UserJobRepositoryInterface; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -86,7 +87,7 @@ final readonly class JobFilter implements FilterInterface return ['job' => $this->denormalizeDoctrineEntity($formData['job'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $userjobs = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php index 78afe0aeb..637f1542b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Form\Type\PickUserDynamicType; @@ -98,7 +99,7 @@ final readonly class ReferrerFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $users = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index b3cbb8941..53df32168 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; use Chill\MainBundle\Entity\Scope; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Repository\ScopeRepositoryInterface; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -85,7 +86,7 @@ final readonly class ScopeFilter implements FilterInterface return ['scope' => $this->denormalizeDoctrineEntity($formData['scope'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $scopes = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php index ec0e6f547..a05629b50 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\SocialWorkFilters; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\SocialWork\Goal; @@ -115,7 +116,7 @@ class SocialWorkTypeFilter implements FilterInterface return ['action_type' => [], 'goal' => [], 'result' => []]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): array { $actionTypes = []; $goals = []; diff --git a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php index c997fed0b..dab083616 100644 --- a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php +++ b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\ReportBundle\Export\Filter; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -88,7 +89,7 @@ class ReportDateFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array + public function describeAction($data, ExportGenerationContext $context, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by report\'s date: ' .'between %date_from% and %date_to%', [ diff --git a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data-with-chained-builder.php.inc b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data-with-chained-builder.php.inc index ed46f6381..54f539fc6 100644 --- a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data-with-chained-builder.php.inc +++ b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data-with-chained-builder.php.inc @@ -2,6 +2,7 @@ namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -11,7 +12,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } @@ -57,6 +58,7 @@ class MyClass implements FilterInterface namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -66,7 +68,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } diff --git a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data.php.inc b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data.php.inc index 5429d3c82..92f12dca0 100644 --- a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data.php.inc +++ b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-multiple-reuse-data-on-form-default-data.php.inc @@ -2,6 +2,7 @@ namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -11,7 +12,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } @@ -55,6 +56,7 @@ class MyClass implements FilterInterface namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -64,7 +66,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } diff --git a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-no-data-on-builder.php.inc b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-no-data-on-builder.php.inc index 285c16b50..37d8ab263 100644 --- a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-no-data-on-builder.php.inc +++ b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-no-data-on-builder.php.inc @@ -2,6 +2,7 @@ namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -11,7 +12,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } @@ -53,6 +54,7 @@ class MyClass implements FilterInterface namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -62,7 +64,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } diff --git a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-reuse-data-on-form-default-data.php.inc b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-reuse-data-on-form-default-data.php.inc index b2e78e49c..9ab9d3d47 100644 --- a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-reuse-data-on-form-default-data.php.inc +++ b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-reuse-data-on-form-default-data.php.inc @@ -2,6 +2,7 @@ namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -10,7 +11,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } @@ -49,6 +50,7 @@ class MyClass implements FilterInterface namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; @@ -57,7 +59,7 @@ use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } diff --git a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-with-no-method-get-form-default-data.php.inc b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-with-no-method-get-form-default-data.php.inc index 687bd9d0c..bb9dfc675 100644 --- a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-with-no-method-get-form-default-data.php.inc +++ b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/filter-with-no-method-get-form-default-data.php.inc @@ -2,13 +2,14 @@ namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } @@ -44,13 +45,14 @@ class MyClass implements FilterInterface namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } diff --git a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/skip-filter-existing-get-form-default-data-method.php.inc b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/skip-filter-existing-get-form-default-data-method.php.inc index 2fefc908d..fe6c92fad 100644 --- a/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/skip-filter-existing-get-form-default-data-method.php.inc +++ b/utils/rector/tests/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/Fixture/skip-filter-existing-get-form-default-data-method.php.inc @@ -2,13 +2,14 @@ namespace Utils\Rector\Tests\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector\Fixture; +use Chill\MainBundle\Export\ExportGenerationContext; use Chill\MainBundle\Export\FilterInterface; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; class MyClass implements FilterInterface { - public function describeAction($data, $format = 'string') + public function describeAction($data, ExportGenerationContext $context, $format = 'string') { // TODO: Implement describeAction() method. } diff --git a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-chained-field.php.inc b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-chained-field.php.inc index 036a53b8a..0ec493783 100644 --- a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-chained-field.php.inc +++ b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-chained-field.php.inc @@ -29,7 +29,7 @@ class MyFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; } @@ -96,7 +96,7 @@ class MyFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; } diff --git a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-simple-field.php.inc b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-simple-field.php.inc index 3a31f1ac2..9a84bed7e 100644 --- a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-simple-field.php.inc +++ b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-simple-field.php.inc @@ -32,7 +32,7 @@ class MyFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; } @@ -102,7 +102,7 @@ class MyFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; } diff --git a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-with-already-trait.php.inc b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-with-already-trait.php.inc index 8911a671d..f3129e6e1 100644 --- a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-with-already-trait.php.inc +++ b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/add-method-with-already-trait.php.inc @@ -24,7 +24,7 @@ class MyFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; } @@ -85,7 +85,7 @@ class MyFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; } diff --git a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/skip-existing-method.php.inc b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/skip-existing-method.php.inc index 25e843a9a..830c30eb8 100644 --- a/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/skip-existing-method.php.inc +++ b/utils/rector/tests/ChillBundleAddNormalizationMethodsOnExportRector/Fixture/skip-existing-method.php.inc @@ -33,7 +33,7 @@ class MyFilterUpdated implements FilterInterface return 1; } - public function describeAction($data, $format = 'string') + public function describeAction($data, \Chill\MainBundle\Export\ExportGenerationContext $context, $format = 'string') { return []; }