remove usage of deprecated Role into Export

This commit is contained in:
2022-09-05 17:26:36 +02:00
parent c442529799
commit 75bdc335e5
125 changed files with 153 additions and 154 deletions

View File

@@ -32,7 +32,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -33,7 +33,7 @@ class ClosingMotiveAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -27,7 +27,7 @@ class ConfidentialAggregator implements AggregatorInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class DurationAggregator implements AggregatorInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -27,7 +27,7 @@ class EmergencyAggregator implements AggregatorInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -33,7 +33,7 @@ final class EvaluationAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -27,7 +27,7 @@ class IntensityAggregator implements AggregatorInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class JobAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -34,7 +34,7 @@ final class OriginAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class ReferrerAggregator implements AggregatorInterface
$this->userRender = $userRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class ScopeAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -33,7 +33,7 @@ final class SocialActionAggregator implements AggregatorInterface
$this->actionRepository = $actionRepository;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class SocialIssueAggregator implements AggregatorInterface
$this->issueRender = $issueRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -33,7 +33,7 @@ final class StepAggregator implements AggregatorInterface //, FilterInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ class EvaluationTypeAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ class ChildrenNumberAggregator implements AggregatorInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -37,7 +37,7 @@ class CompositionAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -29,7 +29,7 @@ final class AgeAggregator implements AggregatorInterface, ExportElementValidated
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -42,7 +42,7 @@ final class CountryOfBirthAggregator implements AggregatorInterface, ExportEleme
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -28,7 +28,7 @@ final class GenderAggregator implements AggregatorInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -37,7 +37,7 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ final class MaritalStatusAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -41,7 +41,7 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ final class ActionTypeAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ final class GoalAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class JobAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class ReferrerAggregator implements AggregatorInterface
$this->userRender = $userRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ final class ResultAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ final class ScopeAggregator implements AggregatorInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -98,9 +98,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
return $qb;
}
public function requiredRole(): Role
public function requiredRole(): string
{
return new Role(AccompanyingPeriodVoter::STATS);
return AccompanyingPeriodVoter::STATS;
}
public function supportsModifiers(): array

View File

@@ -98,9 +98,9 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(AccompanyingPeriodVoter::STATS);
return AccompanyingPeriodVoter::STATS;
}
public function supportsModifiers(): array

View File

@@ -17,6 +17,7 @@ use Chill\MainBundle\Export\GroupedExportInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Export\Declarations;
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter;
use Chill\PersonBundle\Security\Authorization\HouseholdVoter;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;
@@ -100,10 +101,9 @@ class CountHousehold implements ExportInterface, GroupedExportInterface
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
// TODO HouseholdVoter::STATS !??
return new Role(AccompanyingPeriodVoter::STATS);
return HouseholdVoter::STATS;
}
public function supportsModifiers(): array

View File

@@ -108,9 +108,9 @@ class CountPerson implements ExportInterface, GroupedExportInterface
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(PersonVoter::STATS);
return PersonVoter::STATS;
}
public function supportsModifiers()

View File

@@ -98,9 +98,9 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(AccompanyingPeriodVoter::STATS);
return AccompanyingPeriodVoter::STATS;
}
public function supportsModifiers(): array

View File

@@ -99,10 +99,9 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface
return $qb;
}
public function requiredRole(): Role
public function requiredRole(): string
{
//TODO change to string, but changes needed also in ExportManager and possibly other locations.
return new Role(AccompanyingPeriodVoter::STATS);
return AccompanyingPeriodVoter::STATS;
}
public function supportsModifiers(): array

View File

@@ -355,9 +355,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou
return $qb;
}
public function requiredRole()
public function requiredRole(): string
{
return new Role(PersonVoter::LISTS);
return PersonVoter::LISTS;
}
public function supportsModifiers()

View File

@@ -110,9 +110,9 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn
return $qb;
}
public function requiredRole(): Role
public function requiredRole(): string
{
return new Role(AccompanyingPeriodVoter::STATS);
return AccompanyingPeriodVoter::STATS;
}
public function supportsModifiers(): array

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ActiveOnDateFilter implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class ActiveOneDayBetweenDatesFilter implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -32,7 +32,7 @@ class ActivityTypeFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ class AdministrativeLocationFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ class ClosingMotiveFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class ConfidentialFilter implements FilterInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class CurrentUserJobFilter implements FilterInterface
$this->security = $security;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class CurrentUserScopeFilter implements FilterInterface
$this->security = $security;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ class EvaluationFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -34,7 +34,7 @@ use Symfony\Component\Form\FormBuilderInterface;
*/
class GeographicalUnitStatFilter implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class IntensityFilter implements FilterInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class OpenBetweenDatesFilter implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ class OriginFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -29,7 +29,7 @@ class ReferrerFilter implements FilterInterface
$this->userRender = $userRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -44,7 +44,7 @@ class RequestorFilter implements FilterInterface
$this->em = $em;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -36,7 +36,7 @@ class SocialActionFilter implements FilterInterface
$this->actionRender = $actionRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -43,7 +43,7 @@ class SocialIssueFilter implements FilterInterface
$this->socialIssueRender = $socialIssueRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -40,7 +40,7 @@ class StepFilter implements FilterInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -30,7 +30,7 @@ final class EvaluationTypeFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -33,7 +33,7 @@ class MaxDateFilter implements FilterInterface
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -34,7 +34,7 @@ class CompositionFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AccompanyingPeriodClosingFilter extends AbstractAccompanyingPeriodExportElement implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AccompanyingPeriodFilter extends AbstractAccompanyingPeriodExportElement implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class AccompanyingPeriodOpeningFilter extends AbstractAccompanyingPeriodExportElement implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -24,7 +24,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class AgeFilter implements ExportElementValidatedInterface, FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -21,7 +21,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class DeadOrAliveFilter implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -23,7 +23,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
class DeathdateFilter implements ExportElementValidatedInterface, FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\DateType;
class FamilySituationFilter implements FilterInterface
{
//TODO where to find this property? On VendeePerson rather than Person. Not sure what this refers to exactly...
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -42,7 +42,7 @@ class GenderFilter implements
$this->translator = $translator;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -36,7 +36,7 @@ class NationalityFilter implements
$this->translatableStringHelper = $helper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -31,7 +31,7 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -18,7 +18,7 @@ use Doctrine\ORM\QueryBuilder;
class ResidentialAddressAtUserFilter implements FilterInterface
{
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class JobFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -29,7 +29,7 @@ class ReferrerFilter implements FilterInterface
$this->userRender = $userRender;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -35,7 +35,7 @@ class ScopeFilter implements FilterInterface
$this->translatableStringHelper = $translatableStringHelper;
}
public function addRole()
public function addRole(): ?string
{
return null;
}

View File

@@ -44,7 +44,7 @@ class SocialWorkTypeFilter implements FilterInterface
$this->socialActionRepository = $socialActionRepository;
}
public function addRole()
public function addRole(): ?string
{
return null;
}