mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Implements new return types
This commit is contained in:
parent
1c4ee37507
commit
8e952cc966
@ -29,7 +29,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
// here, we alter the query created by Export
|
// here, we alter the query created by Export
|
||||||
public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
// we create the clause here
|
// we create the clause here
|
||||||
@ -53,13 +53,13 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we give information on which type of export this filter applies
|
// we give information on which type of export this filter applies
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return 'person';
|
return 'person';
|
||||||
}
|
}
|
||||||
|
|
||||||
// we build a form to collect some parameters from the users
|
// we build a form to collect some parameters from the users
|
||||||
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder)
|
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('date_from', DateType::class, [
|
$builder->add('date_from', DateType::class, [
|
||||||
'label' => 'Born after this date',
|
'label' => 'Born after this date',
|
||||||
@ -94,7 +94,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
|
|
||||||
// here, we create a simple string which will describe the action of
|
// here, we create a simple string which will describe the action of
|
||||||
// the filter in the Response
|
// the filter in the Response
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
return ['Filtered by person\'s birtdate: '
|
return ['Filtered by person\'s birtdate: '
|
||||||
. 'between %date_from% and %date_to%', [
|
. 'between %date_from% and %date_to%', [
|
||||||
@ -103,7 +103,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
], ];
|
], ];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filter by person\'s birthdate';
|
return 'Filter by person\'s birthdate';
|
||||||
}
|
}
|
||||||
@ -112,7 +112,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
// is executed here. This function is added by the interface
|
// is executed here. This function is added by the interface
|
||||||
// `ExportElementValidatedInterface`, and can be ignore if there is
|
// `ExportElementValidatedInterface`, and can be ignore if there is
|
||||||
// no need for a validation
|
// no need for a validation
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
$date_from = $data['date_from'];
|
$date_from = $data['date_from'];
|
||||||
$date_to = $data['date_to'];
|
$date_to = $data['date_to'];
|
||||||
|
@ -72,24 +72,24 @@ class CountPerson implements ExportInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
// this array match the result keys in the query. We have only
|
// this array match the result keys in the query. We have only
|
||||||
// one column.
|
// one column.
|
||||||
return ['export_result'];
|
return ['export_result'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Count peoples';
|
return 'Count peoples';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return Declarations::PERSON_TYPE;
|
return Declarations::PERSON_TYPE;
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => __DIR__ . 'src/Bundle/ChillMainBundle/Service/Notifier/LegacyOvhCloudFactory.php'
|
\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => __DIR__ . 'src/Bundle/ChillMainBundle/Service/Notifier/LegacyOvhCloudFactory.php'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/test/App_KernelTestDebugContainer.xml ');
|
//$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/test/App_KernelTestDebugContainer.xml ');
|
||||||
$rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php');
|
//$rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php');
|
||||||
|
|
||||||
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
||||||
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
|
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
|
||||||
|
@ -33,7 +33,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
private TranslatableStringHelperInterface $translatableStringHelper,
|
private TranslatableStringHelperInterface $translatableStringHelper,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('after_date', PickRollingDateType::class, [
|
->add('after_date', PickRollingDateType::class, [
|
||||||
@ -84,12 +84,12 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return [self::PREFIX.'_actype_id'];
|
return [self::PREFIX.'_actype_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.aggregator.acp.by_activity_type.title';
|
return 'export.aggregator.acp.by_activity_type.title';
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
->addGroupBy("{$p}_actype_id");
|
->addGroupBy("{$p}_actype_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACP_TYPE;
|
return Declarations::ACP_TYPE;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class BySocialActionAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
|
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.socialActions', 'actsocialaction');
|
$qb->leftJoin('activity.socialActions', 'actsocialaction');
|
||||||
@ -42,7 +42,7 @@ class BySocialActionAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY_ACP;
|
return Declarations::ACTIVITY_ACP;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class BySocialIssueAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
|
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.socialIssues', 'actsocialissue');
|
$qb->leftJoin('activity.socialIssues', 'actsocialissue');
|
||||||
@ -42,7 +42,7 @@ class BySocialIssueAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY_ACP;
|
return Declarations::ACTIVITY_ACP;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.location', 'actloc');
|
$qb->leftJoin('activity.location', 'actloc');
|
||||||
@ -39,7 +39,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form required for this aggregator
|
// no form required for this aggregator
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface
|
|||||||
return [self::KEY];
|
return [self::KEY];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.aggregator.activity.by_location.Title';
|
return 'export.aggregator.activity.by_location.Title';
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
|
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['activity_presence_aggregator_attendee'];
|
return ['activity_presence_aggregator_attendee'];
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface
|
|||||||
$qb->addGroupBy('activity_presence_aggregator_attendee');
|
$qb->addGroupBy('activity_presence_aggregator_attendee');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
// add select element
|
// add select element
|
||||||
if ('reasons' === $data['level']) {
|
if ('reasons' === $data['level']) {
|
||||||
@ -72,7 +72,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add(
|
$builder->add(
|
||||||
'level',
|
'level',
|
||||||
@ -140,7 +140,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
// add select element
|
// add select element
|
||||||
if ('reasons' === $data['level']) {
|
if ('reasons' === $data['level']) {
|
||||||
@ -154,12 +154,12 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali
|
|||||||
throw new \RuntimeException('The data provided are not recognised.');
|
throw new \RuntimeException('The data provided are not recognised.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Aggregate by activity reason';
|
return 'Aggregate by activity reason';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
if (null === $data['level']) {
|
if (null === $data['level']) {
|
||||||
$context
|
$context
|
||||||
|
@ -29,7 +29,7 @@ class ActivityTypeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('acttype', $qb->getAllAliases(), true)) {
|
if (!\in_array('acttype', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.activityType', 'acttype');
|
$qb->leftJoin('activity.activityType', 'acttype');
|
||||||
@ -44,7 +44,7 @@ class ActivityTypeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form required for this aggregator
|
// no form required for this aggregator
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ class ActivityTypeAggregator implements AggregatorInterface
|
|||||||
return [self::KEY];
|
return [self::KEY];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Aggregate by activity type';
|
return 'Aggregate by activity type';
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class ActivityUserAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
// add select element
|
// add select element
|
||||||
$qb->addSelect(sprintf('IDENTITY(activity.user) AS %s', self::KEY));
|
$qb->addSelect(sprintf('IDENTITY(activity.user) AS %s', self::KEY));
|
||||||
@ -43,7 +43,7 @@ class ActivityUserAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// nothing to add
|
// nothing to add
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ class ActivityUserAggregator implements AggregatorInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return [self::KEY];
|
return [self::KEY];
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class ActivityUsersAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actusers', $qb->getAllAliases(), true)) {
|
if (!\in_array('actusers', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.users', 'actusers');
|
$qb->leftJoin('activity.users', 'actusers');
|
||||||
@ -43,7 +43,7 @@ class ActivityUsersAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// nothing to add on the form
|
// nothing to add on the form
|
||||||
}
|
}
|
||||||
@ -85,12 +85,12 @@ class ActivityUsersAggregator implements AggregatorInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['activity_users_aggregator'];
|
return ['activity_users_aggregator'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Aggregate by activity users';
|
return 'Aggregate by activity users';
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ class ByCreatorAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator');
|
$qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator');
|
||||||
$qb->addGroupBy('creator_aggregator');
|
$qb->addGroupBy('creator_aggregator');
|
||||||
@ -38,7 +38,7 @@ class ByCreatorAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('acttparty', $qb->getAllAliases(), true)) {
|
if (!\in_array('acttparty', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.thirdParties', 'acttparty');
|
$qb->leftJoin('activity.thirdParties', 'acttparty');
|
||||||
@ -42,7 +42,7 @@ class ByThirdpartyAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ class CreatorScopeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class CreatorScopeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -32,7 +32,7 @@ class DateAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$order = null;
|
$order = null;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class DateAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('frequency', ChoiceType::class, [
|
$builder->add('frequency', ChoiceType::class, [
|
||||||
'choices' => self::CHOICES,
|
'choices' => self::CHOICES,
|
||||||
|
@ -27,7 +27,7 @@ class LocationTypeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('activity.location', 'actloc');
|
$qb->leftJoin('activity.location', 'actloc');
|
||||||
@ -42,7 +42,7 @@ class LocationTypeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
public function __construct(private HouseholdRepository $householdRepository) {}
|
public function __construct(private HouseholdRepository $householdRepository) {}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// nothing to add here
|
// nothing to add here
|
||||||
}
|
}
|
||||||
@ -64,12 +64,12 @@ final readonly class HouseholdAggregator implements AggregatorInterface
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['activity_household_agg'];
|
return ['activity_household_agg'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.aggregator.person.by_household.title';
|
return 'export.aggregator.person.by_household.title';
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb->join(
|
$qb->join(
|
||||||
HouseholdMember::class,
|
HouseholdMember::class,
|
||||||
@ -107,7 +107,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface
|
|||||||
->addGroupBy('activity_household_agg');
|
->addGroupBy('activity_household_agg');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY_PERSON;
|
return Declarations::ACTIVITY_PERSON;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ final readonly class PersonAggregator implements AggregatorInterface
|
|||||||
{
|
{
|
||||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// nothing to add here
|
// nothing to add here
|
||||||
}
|
}
|
||||||
@ -51,12 +51,12 @@ final readonly class PersonAggregator implements AggregatorInterface
|
|||||||
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person');
|
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['activity_by_person_agg'];
|
return ['activity_by_person_agg'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.aggregator.person.by_person.title';
|
return 'export.aggregator.person.by_person.title';
|
||||||
}
|
}
|
||||||
@ -66,14 +66,14 @@ final readonly class PersonAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb
|
$qb
|
||||||
->addSelect('IDENTITY(activity.person) AS activity_by_person_agg')
|
->addSelect('IDENTITY(activity.person) AS activity_by_person_agg')
|
||||||
->addGroupBy('activity_by_person_agg');
|
->addGroupBy('activity_by_person_agg');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY_PERSON;
|
return Declarations::ACTIVITY_PERSON;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
|||||||
|
|
||||||
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
public function __construct(private LabelPersonHelper $labelPersonHelper) {}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// nothing to add here
|
// nothing to add here
|
||||||
}
|
}
|
||||||
@ -61,12 +61,12 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
|||||||
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.activity.by_persons.Persons');
|
return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.activity.by_persons.Persons');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return [self::PREFIX.'_pid'];
|
return [self::PREFIX.'_pid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.aggregator.activity.by_persons.Group activity by persons';
|
return 'export.aggregator.activity.by_persons.Group activity by persons';
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ final readonly class PersonsAggregator implements AggregatorInterface
|
|||||||
->addGroupBy("{$p}_pid");
|
->addGroupBy("{$p}_pid");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_avg_activity_duration'];
|
return ['export_avg_activity_duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, ExportGenerationContext $context)
|
public function getResult($query, $data, ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
|||||||
return ['export_avg_activity_visit_duration'];
|
return ['export_avg_activity_visit_duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, ExportGenerationContext $context)
|
public function getResult($query, $data, ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_count_activity'];
|
return ['export_count_activity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
|||||||
return ['export_count_activity'];
|
return ['export_count_activity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,7 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_count_activity'];
|
return ['export_count_activity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
array_merge(
|
array_merge(
|
||||||
@ -101,17 +101,17 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, ExportGenerationContext $context)
|
public function getResult($query, $data, ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $this->helper->getResult($query, $data);
|
return $this->helper->getResult($query, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return ListActivityHelper::MSG_KEY.'List activity linked to a course';
|
return ListActivityHelper::MSG_KEY.'List activity linked to a course';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return $this->helper->getType();
|
return $this->helper->getType();
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_sum_activity_duration'];
|
return ['export_sum_activity_duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac
|
|||||||
return ['export_sum_activity_visit_duration'];
|
return ['export_sum_activity_visit_duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -79,17 +79,17 @@ class CountActivity implements ExportInterface, GroupedExportInterface
|
|||||||
return static fn ($value) => '_header' === $value ? 'Number of activities linked to a person' : $value;
|
return static fn ($value) => '_header' === $value ? 'Number of activities linked to a person' : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['export_count_activity'];
|
return ['export_count_activity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Count activities linked to a person';
|
return 'Count activities linked to a person';
|
||||||
}
|
}
|
||||||
|
@ -80,17 +80,17 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe
|
|||||||
return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity_person.header' : $value;
|
return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity_person.header' : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['export_count_activity'];
|
return ['export_count_activity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.export.count_household_on_activity_person.title';
|
return 'export.export.count_household_on_activity_person.title';
|
||||||
}
|
}
|
||||||
|
@ -182,17 +182,17 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return $data['fields'];
|
return $data['fields'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'List activity linked to a person';
|
return 'List activity linked to a person';
|
||||||
}
|
}
|
||||||
|
@ -99,17 +99,17 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
|||||||
return static fn (string $value) => '_header' === $value ? $header : $value;
|
return static fn (string $value) => '_header' === $value ? $header : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['export_stat_activity'];
|
return ['export_stat_activity'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
if (self::SUM === $this->action) {
|
if (self::SUM === $this->action) {
|
||||||
return 'Sum activity linked to a person duration';
|
return 'Sum activity linked to a person duration';
|
||||||
|
@ -39,7 +39,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$exists = self::BASE_EXISTS;
|
$exists = self::BASE_EXISTS;
|
||||||
|
|
||||||
@ -63,12 +63,12 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACP_TYPE;
|
return Declarations::ACP_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_activitytypes', EntityType::class, [
|
$builder->add('accepted_activitytypes', EntityType::class, [
|
||||||
'class' => ActivityType::class,
|
'class' => ActivityType::class,
|
||||||
@ -100,7 +100,7 @@ final readonly class ActivityTypeFilter implements FilterInterface
|
|||||||
|
|
||||||
public function normalizeFormData(array $formData): array
|
public function normalizeFormData(array $formData): array
|
||||||
{
|
{
|
||||||
return ['accepted_activitytypes' => $this->normalizeDoctrineEntity($formData['accepted_activitytypes']), 'date_after' => $formData['date_after']->normalize(), 'date_before' => $formData['date_before']->normalize()];
|
return ['accepted_activitytypes' => $this->normalizeDoctrineEntity($formData['accepted_activitytypes']), 'date_after' => $formData['date_after']?->normalize(), 'date_before' => $formData['date_before']?->normalize()];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function denormalizeFormData(array $formData, int $fromVersion): array
|
public function denormalizeFormData(array $formData, int $fromVersion): array
|
||||||
|
@ -28,7 +28,7 @@ class BySocialActionFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
|
if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) {
|
||||||
$qb->join('activity.socialActions', 'actsocialaction');
|
$qb->join('activity.socialActions', 'actsocialaction');
|
||||||
@ -48,7 +48,7 @@ class BySocialActionFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY_ACP;
|
return Declarations::ACTIVITY_ACP;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_socialactions', PickSocialActionType::class, [
|
$builder->add('accepted_socialactions', PickSocialActionType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -28,7 +28,7 @@ class BySocialIssueFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
|
if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) {
|
||||||
$qb->join('activity.socialIssues', 'actsocialissue');
|
$qb->join('activity.socialIssues', 'actsocialissue');
|
||||||
@ -48,7 +48,7 @@ class BySocialIssueFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY_ACP;
|
return Declarations::ACTIVITY_ACP;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_socialissues', PickSocialIssueType::class, [
|
$builder->add('accepted_socialissues', PickSocialIssueType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -27,7 +27,7 @@ class HasNoActivityFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb
|
$qb
|
||||||
->andWhere('
|
->andWhere('
|
||||||
@ -43,7 +43,7 @@ class HasNoActivityFilter implements FilterInterface
|
|||||||
return Declarations::ACP_TYPE;
|
return Declarations::ACP_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form needed
|
// no form needed
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,12 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
|||||||
private RollingDateConverterInterface $rollingDateConverter,
|
private RollingDateConverterInterface $rollingDateConverter,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.filter.activity.course_having_activity_between_date.Title';
|
return 'export.filter.activity.course_having_activity_between_date.Title';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('start_date', PickRollingDateType::class, [
|
->add('start_date', PickRollingDateType::class, [
|
||||||
@ -64,7 +64,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'export.filter.activity.course_having_activity_between_date.Only course having an activity between from and to',
|
'export.filter.activity.course_having_activity_between_date.Only course having an activity between from and to',
|
||||||
@ -80,7 +80,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$alias = 'act_period_having_act_betw_date_alias';
|
$alias = 'act_period_having_act_betw_date_alias';
|
||||||
$from = 'act_period_having_act_betw_date_start';
|
$from = 'act_period_having_act_betw_date_start';
|
||||||
@ -97,7 +97,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
|
|||||||
->setParameter($to, $this->rollingDateConverter->convert($data['end_date']));
|
->setParameter($to, $this->rollingDateConverter->convert($data['end_date']));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return \Chill\PersonBundle\Export\Declarations::ACP_TYPE;
|
return \Chill\PersonBundle\Export\Declarations::ACP_TYPE;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class ActivityDateFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
$clause = $qb->expr()->between(
|
$clause = $qb->expr()->between(
|
||||||
@ -61,7 +61,7 @@ class ActivityDateFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('date_from', PickRollingDateType::class, [
|
->add('date_from', PickRollingDateType::class, [
|
||||||
@ -92,7 +92,7 @@ class ActivityDateFilter implements FilterInterface
|
|||||||
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
|
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'Filtered by date of activity: only between %date_from% and %date_to%',
|
'Filtered by date of activity: only between %date_from% and %date_to%',
|
||||||
@ -103,7 +103,7 @@ class ActivityDateFilter implements FilterInterface
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filtered by date activity';
|
return 'Filtered by date activity';
|
||||||
}
|
}
|
||||||
|
@ -32,12 +32,12 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
|||||||
private ActivityPresenceRepositoryInterface $activityPresenceRepository,
|
private ActivityPresenceRepositoryInterface $activityPresenceRepository,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.filter.activity.by_presence.Filter activity by activity presence';
|
return 'export.filter.activity.by_presence.Filter activity by activity presence';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('presences', EntityType::class, [
|
$builder->add('presences', EntityType::class, [
|
||||||
'class' => ActivityPresence::class,
|
'class' => ActivityPresence::class,
|
||||||
@ -69,7 +69,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
$presences = array_map(
|
$presences = array_map(
|
||||||
fn (ActivityPresence $presence) => $this->translatableStringHelper->localize($presence->getName()),
|
fn (ActivityPresence $presence) => $this->translatableStringHelper->localize($presence->getName()),
|
||||||
@ -87,14 +87,14 @@ final readonly class ActivityPresenceFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb
|
$qb
|
||||||
->andWhere('activity.attendee IN (:activity_presence_filter_presences)')
|
->andWhere('activity.attendee IN (:activity_presence_filter_presences)')
|
||||||
->setParameter('activity_presence_filter_presences', $data['presences']);
|
->setParameter('activity_presence_filter_presences', $data['presences']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->in('activity.activityType', ':selected_activity_types');
|
$clause = $qb->expr()->in('activity.activityType', ':selected_activity_types');
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('types', EntityType::class, [
|
$builder->add('types', EntityType::class, [
|
||||||
'choices' => $this->activityTypeRepository->findAllActive(),
|
'choices' => $this->activityTypeRepository->findAllActive(),
|
||||||
@ -92,7 +92,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
// collect all the reasons'name used in this filter in one array
|
// collect all the reasons'name used in this filter in one array
|
||||||
$reasonsNames = array_map(
|
$reasonsNames = array_map(
|
||||||
@ -105,12 +105,12 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter
|
|||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filter by activity type';
|
return 'Filter by activity type';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
if (null === $data['types'] || 0 === \count($data['types'])) {
|
if (null === $data['types'] || 0 === \count($data['types'])) {
|
||||||
$context
|
$context
|
||||||
|
@ -30,7 +30,7 @@ final readonly class ActivityUsersFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$orX = $qb->expr()->orX();
|
$orX = $qb->expr()->orX();
|
||||||
|
|
||||||
@ -42,12 +42,12 @@ final readonly class ActivityUsersFilter implements FilterInterface
|
|||||||
$qb->andWhere($orX);
|
$qb->andWhere($orX);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
@ -75,7 +75,7 @@ final readonly class ActivityUsersFilter implements FilterInterface
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
$users = [];
|
$users = [];
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class ByCreatorFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb
|
$qb
|
||||||
->andWhere(
|
->andWhere(
|
||||||
@ -44,7 +44,7 @@ class ByCreatorFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -40,7 +40,7 @@ final readonly class CreatorJobFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ final readonly class CreatorJobFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('jobs', EntityType::class, [
|
->add('jobs', EntityType::class, [
|
||||||
|
@ -37,7 +37,7 @@ class CreatorScopeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class CreatorScopeFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('scopes', EntityType::class, [
|
->add('scopes', EntityType::class, [
|
||||||
|
@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ class EmergencyFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_emergency', ChoiceType::class, [
|
$builder->add('accepted_emergency', ChoiceType::class, [
|
||||||
'choices' => self::CHOICES,
|
'choices' => self::CHOICES,
|
||||||
|
@ -31,7 +31,7 @@ final readonly class LocationFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb->andWhere(
|
$qb->andWhere(
|
||||||
$qb->expr()->in('activity.location', ':location')
|
$qb->expr()->in('activity.location', ':location')
|
||||||
@ -45,7 +45,7 @@ final readonly class LocationFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_location', PickUserLocationType::class, [
|
$builder->add('accepted_location', PickUserLocationType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -28,7 +28,7 @@ class LocationTypeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
if (!\in_array('actloc', $qb->getAllAliases(), true)) {
|
||||||
$qb->join('activity.location', 'actloc');
|
$qb->join('activity.location', 'actloc');
|
||||||
@ -52,7 +52,7 @@ class LocationTypeFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_locationtype', PickLocationTypeType::class, [
|
$builder->add('accepted_locationtype', PickLocationTypeType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -35,7 +35,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
$join = $qb->getDQLPart('join');
|
$join = $qb->getDQLPart('join');
|
||||||
@ -60,7 +60,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
|||||||
return Declarations::ACTIVITY_PERSON;
|
return Declarations::ACTIVITY_PERSON;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('reasons', EntityType::class, [
|
$builder->add('reasons', EntityType::class, [
|
||||||
'class' => ActivityReason::class,
|
'class' => ActivityReason::class,
|
||||||
@ -92,7 +92,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
// collect all the reasons'name used in this filter in one array
|
// collect all the reasons'name used in this filter in one array
|
||||||
$reasonsNames = array_map(
|
$reasonsNames = array_map(
|
||||||
@ -108,12 +108,12 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filter by reason';
|
return 'Filter by reason';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
if (null === $data['reasons'] || 0 === \count($data['reasons'])) {
|
if (null === $data['reasons'] || 0 === \count($data['reasons'])) {
|
||||||
$context
|
$context
|
||||||
|
@ -92,7 +92,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
return Declarations::PERSON_TYPE;
|
return Declarations::PERSON_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('date_from_rolling', PickRollingDateType::class, [
|
$builder->add('date_from_rolling', PickRollingDateType::class, [
|
||||||
'label' => 'export.filter.activity.person_between_dates.Implied in an activity after this date',
|
'label' => 'export.filter.activity.person_between_dates.Implied in an activity after this date',
|
||||||
@ -165,7 +165,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem
|
|||||||
return 'export.filter.activity.person_between_dates.title';
|
return 'export.filter.activity.person_between_dates.title';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
|
if ($this->rollingDateConverter->convert($data['date_from_rolling'])
|
||||||
>= $this->rollingDateConverter->convert($data['date_to_rolling'])) {
|
>= $this->rollingDateConverter->convert($data['date_to_rolling'])) {
|
||||||
|
@ -33,7 +33,7 @@ final readonly class PersonsFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -47,12 +47,12 @@ final readonly class PersonsFilter implements FilterInterface
|
|||||||
$qb->andWhere($orX);
|
$qb->andWhere($orX);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_persons', PickPersonDynamicType::class, [
|
$builder->add('accepted_persons', PickPersonDynamicType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
@ -82,7 +82,7 @@ final readonly class PersonsFilter implements FilterInterface
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
$users = [];
|
$users = [];
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ class SentReceivedFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class SentReceivedFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_sentreceived', ChoiceType::class, [
|
$builder->add('accepted_sentreceived', ChoiceType::class, [
|
||||||
'choices' => self::CHOICES,
|
'choices' => self::CHOICES,
|
||||||
|
@ -31,7 +31,7 @@ final readonly class UserFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ final readonly class UserFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -38,7 +38,7 @@ class UsersJobFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -61,12 +61,12 @@ class UsersJobFilter implements FilterInterface
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function applyOn()
|
public function applyOn(): string
|
||||||
{
|
{
|
||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('jobs', EntityType::class, [
|
->add('jobs', EntityType::class, [
|
||||||
@ -93,7 +93,7 @@ class UsersJobFilter implements FilterInterface
|
|||||||
return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)];
|
return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
return ['export.filter.activity.by_users_job.Filtered activity by users job: only %jobs%', [
|
return ['export.filter.activity.by_users_job.Filtered activity by users job: only %jobs%', [
|
||||||
'%jobs%' => implode(
|
'%jobs%' => implode(
|
||||||
@ -113,7 +113,7 @@ class UsersJobFilter implements FilterInterface
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.filter.activity.by_users_job.Filter by users job';
|
return 'export.filter.activity.by_users_job.Filter by users job';
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class UsersScopeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class UsersScopeFilter implements FilterInterface
|
|||||||
return Declarations::ACTIVITY;
|
return Declarations::ACTIVITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('scopes', EntityType::class, [
|
->add('scopes', EntityType::class, [
|
||||||
|
@ -30,7 +30,7 @@ class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb->addSelect('IDENTITY(aside.type) AS by_aside_activity_type_aggregator')
|
$qb->addSelect('IDENTITY(aside.type) AS by_aside_activity_type_aggregator')
|
||||||
->addGroupBy('by_aside_activity_type_aggregator');
|
->addGroupBy('by_aside_activity_type_aggregator');
|
||||||
@ -41,7 +41,7 @@ class ByActivityTypeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// No form needed
|
// No form needed
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class ByUserJobAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class ByUserJobAggregator implements AggregatorInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ class ByUserScopeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ class ByUserScopeAggregator implements AggregatorInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterfac
|
|||||||
return ['export_avg_aside_activity_duration'];
|
return ['export_avg_aside_activity_duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ class CountAsideActivity implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_result'];
|
return ['export_result'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id',
|
'id',
|
||||||
@ -180,7 +180,7 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn
|
|||||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_ARRAY);
|
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_ARRAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'export.aside_activity.List of aside activities';
|
return 'export.aside_activity.List of aside activities';
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ class SumAsideActivityDuration implements ExportInterface, GroupedExportInterfac
|
|||||||
return ['export_sum_aside_activity_duration'];
|
return ['export_sum_aside_activity_duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class ByActivityTypeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->in('aside.type', ':types');
|
$clause = $qb->expr()->in('aside.type', ':types');
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class ByActivityTypeFilter implements FilterInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('types', EntityType::class, [
|
->add('types', EntityType::class, [
|
||||||
|
@ -29,7 +29,7 @@ class ByDateFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->between(
|
$clause = $qb->expr()->between(
|
||||||
'aside.date',
|
'aside.date',
|
||||||
@ -53,7 +53,7 @@ class ByDateFilter implements FilterInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('date_from', PickRollingDateType::class, [
|
->add('date_from', PickRollingDateType::class, [
|
||||||
|
@ -30,7 +30,7 @@ final readonly class ByUserFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->in('aside.agent', ':users');
|
$clause = $qb->expr()->in('aside.agent', ':users');
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ final readonly class ByUserFilter implements FilterInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_users', PickUserDynamicType::class, [
|
$builder->add('accepted_users', PickUserDynamicType::class, [
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
|
@ -38,7 +38,7 @@ class ByUserJobFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class ByUserJobFilter implements FilterInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('jobs', EntityType::class, [
|
->add('jobs', EntityType::class, [
|
||||||
|
@ -38,7 +38,7 @@ class ByUserScopeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class ByUserScopeFilter implements FilterInterface
|
|||||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('scopes', EntityType::class, [
|
->add('scopes', EntityType::class, [
|
||||||
@ -93,7 +93,7 @@ class ByUserScopeFilter implements FilterInterface
|
|||||||
return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)];
|
return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
return ['export.filter.by_user_scope.Filtered aside activities by user scope: only %scopes%', [
|
return ['export.filter.by_user_scope.Filtered aside activities by user scope: only %scopes%', [
|
||||||
'%scopes%' => implode(
|
'%scopes%' => implode(
|
||||||
|
@ -27,7 +27,7 @@ final readonly class AgentAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('caluser', $qb->getAllAliases(), true)) {
|
if (!\in_array('caluser', $qb->getAllAliases(), true)) {
|
||||||
$qb->join('cal.mainUser', 'caluser');
|
$qb->join('cal.mainUser', 'caluser');
|
||||||
@ -42,7 +42,7 @@ final readonly class AgentAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class CancelReasonAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
// TODO: still needs to take into account calendars without a cancel reason somehow
|
// TODO: still needs to take into account calendars without a cancel reason somehow
|
||||||
if (!\in_array('calcancel', $qb->getAllAliases(), true)) {
|
if (!\in_array('calcancel', $qb->getAllAliases(), true)) {
|
||||||
@ -43,7 +43,7 @@ class CancelReasonAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@ final readonly class LocationAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
|
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
|
||||||
$qb->join('cal.location', 'calloc');
|
$qb->join('cal.location', 'calloc');
|
||||||
@ -40,7 +40,7 @@ final readonly class LocationAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
|
if (!\in_array('calloc', $qb->getAllAliases(), true)) {
|
||||||
$qb->join('cal.location', 'calloc');
|
$qb->join('cal.location', 'calloc');
|
||||||
@ -42,7 +42,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ class MonthYearAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb->addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator");
|
$qb->addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator");
|
||||||
// $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator");
|
// $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator");
|
||||||
@ -35,7 +35,7 @@ class MonthYearAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// No form needed
|
// No form needed
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder) {}
|
public function buildForm(FormBuilderInterface $builder): void {}
|
||||||
|
|
||||||
public function getNormalizationVersion(): int
|
public function getNormalizationVersion(): int
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,7 @@ class UrgencyAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$qb->addSelect('cal.urgent AS urgency_aggregator');
|
$qb->addSelect('cal.urgent AS urgency_aggregator');
|
||||||
$qb->addGroupBy('urgency_aggregator');
|
$qb->addGroupBy('urgency_aggregator');
|
||||||
@ -44,7 +44,7 @@ class UrgencyAggregator implements AggregatorInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form
|
// no form
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_result'];
|
return ['export_result'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_result'];
|
return ['export_result'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface
|
|||||||
return ['export_result'];
|
return ['export_result'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ final readonly class AgentFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
$clause = $qb->expr()->in('cal.mainUser', ':agents');
|
$clause = $qb->expr()->in('cal.mainUser', ':agents');
|
||||||
@ -52,7 +52,7 @@ final readonly class AgentFilter implements FilterInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('accepted_agents', EntityType::class, [
|
$builder->add('accepted_agents', EntityType::class, [
|
||||||
'class' => User::class,
|
'class' => User::class,
|
||||||
|
@ -28,7 +28,7 @@ class BetweenDatesFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->andX(
|
$clause = $qb->expr()->andX(
|
||||||
$qb->expr()->gte('cal.startDate', ':dateFrom'),
|
$qb->expr()->gte('cal.startDate', ':dateFrom'),
|
||||||
@ -52,7 +52,7 @@ class BetweenDatesFilter implements FilterInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('date_from', PickRollingDateType::class, [])
|
->add('date_from', PickRollingDateType::class, [])
|
||||||
|
@ -41,7 +41,7 @@ class CalendarRangeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (null !== $data['hasCalendarRange']) {
|
if (null !== $data['hasCalendarRange']) {
|
||||||
$qb->andWhere($qb->expr()->isNotNull('cal.calendarRange'));
|
$qb->andWhere($qb->expr()->isNotNull('cal.calendarRange'));
|
||||||
@ -55,7 +55,7 @@ class CalendarRangeFilter implements FilterInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('hasCalendarRange', ChoiceType::class, [
|
$builder->add('hasCalendarRange', ChoiceType::class, [
|
||||||
'choices' => self::CHOICES,
|
'choices' => self::CHOICES,
|
||||||
|
@ -37,7 +37,7 @@ final readonly class JobFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ final readonly class JobFilter implements FilterInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('job', EntityType::class, [
|
->add('job', EntityType::class, [
|
||||||
|
@ -39,7 +39,7 @@ class ScopeFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$p = self::PREFIX;
|
$p = self::PREFIX;
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ class ScopeFilter implements FilterInterface
|
|||||||
return Declarations::CALENDAR_TYPE;
|
return Declarations::CALENDAR_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('scope', EntityType::class, [
|
->add('scope', EntityType::class, [
|
||||||
|
@ -32,7 +32,7 @@ class EventDateAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$order = null;
|
$order = null;
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ class EventDateAggregator implements AggregatorInterface
|
|||||||
return Declarations::EVENT;
|
return Declarations::EVENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('frequency', ChoiceType::class, [
|
$builder->add('frequency', ChoiceType::class, [
|
||||||
'choices' => self::CHOICES,
|
'choices' => self::CHOICES,
|
||||||
|
@ -29,7 +29,7 @@ class EventTypeAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('eventtype', $qb->getAllAliases(), true)) {
|
if (!\in_array('eventtype', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('event.type', 'eventtype');
|
$qb->leftJoin('event.type', 'eventtype');
|
||||||
@ -44,7 +44,7 @@ class EventTypeAggregator implements AggregatorInterface
|
|||||||
return Declarations::EVENT;
|
return Declarations::EVENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form required for this aggregator
|
// no form required for this aggregator
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ class EventTypeAggregator implements AggregatorInterface
|
|||||||
return [self::KEY];
|
return [self::KEY];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Group by event type';
|
return 'Group by event type';
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class RoleAggregator implements AggregatorInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
if (!\in_array('event_part', $qb->getAllAliases(), true)) {
|
if (!\in_array('event_part', $qb->getAllAliases(), true)) {
|
||||||
$qb->leftJoin('event_part.role', 'role');
|
$qb->leftJoin('event_part.role', 'role');
|
||||||
@ -44,7 +44,7 @@ class RoleAggregator implements AggregatorInterface
|
|||||||
return Declarations::EVENT_PARTICIPANTS;
|
return Declarations::EVENT_PARTICIPANTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
// no form required for this aggregator
|
// no form required for this aggregator
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ class RoleAggregator implements AggregatorInterface
|
|||||||
return [self::KEY];
|
return [self::KEY];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Group by participant role';
|
return 'Group by participant role';
|
||||||
}
|
}
|
||||||
|
@ -80,17 +80,17 @@ readonly class CountEventParticipations implements ExportInterface, GroupedExpor
|
|||||||
return static fn ($value) => '_header' === $value ? 'Count event participants' : $value;
|
return static fn ($value) => '_header' === $value ? 'Count event participants' : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['export_count_event_participants'];
|
return ['export_count_event_participants'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Count event participants';
|
return 'Count event participants';
|
||||||
}
|
}
|
||||||
|
@ -80,17 +80,17 @@ readonly class CountEvents implements ExportInterface, GroupedExportInterface
|
|||||||
return static fn ($value) => '_header' === $value ? 'Number of events' : $value;
|
return static fn ($value) => '_header' === $value ? 'Number of events' : $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return ['export_count_event'];
|
return ['export_count_event'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Count events';
|
return 'Count events';
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class EventDateFilter implements FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
$clause = $qb->expr()->between(
|
$clause = $qb->expr()->between(
|
||||||
@ -61,7 +61,7 @@ class EventDateFilter implements FilterInterface
|
|||||||
return Declarations::EVENT;
|
return Declarations::EVENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('date_from', PickRollingDateType::class, [
|
->add('date_from', PickRollingDateType::class, [
|
||||||
@ -92,7 +92,7 @@ class EventDateFilter implements FilterInterface
|
|||||||
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
|
return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'Filtered by date of event: only between %date_from% and %date_to%',
|
'Filtered by date of event: only between %date_from% and %date_to%',
|
||||||
@ -103,7 +103,7 @@ class EventDateFilter implements FilterInterface
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filtered by event date';
|
return 'Filtered by event date';
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->in('event.type', ':selected_event_types');
|
$clause = $qb->expr()->in('event.type', ':selected_event_types');
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
return Declarations::EVENT;
|
return Declarations::EVENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('types', EntityType::class, [
|
$builder->add('types', EntityType::class, [
|
||||||
'choices' => $this->eventTypeRepository->findAllActive(),
|
'choices' => $this->eventTypeRepository->findAllActive(),
|
||||||
@ -83,7 +83,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
$typeNames = array_map(
|
$typeNames = array_map(
|
||||||
fn (EventType $t): string => $this->translatableStringHelper->localize($t->getName()),
|
fn (EventType $t): string => $this->translatableStringHelper->localize($t->getName()),
|
||||||
@ -95,12 +95,12 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac
|
|||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filtered by event type';
|
return 'Filtered by event type';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
if (null === $data['types'] || 0 === \count($data['types'])) {
|
if (null === $data['types'] || 0 === \count($data['types'])) {
|
||||||
$context
|
$context
|
||||||
|
@ -36,7 +36,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext)
|
public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void
|
||||||
{
|
{
|
||||||
$clause = $qb->expr()->in('event_part.role', ':selected_part_roles');
|
$clause = $qb->expr()->in('event_part.role', ':selected_part_roles');
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
|
|||||||
return Declarations::EVENT_PARTICIPANTS;
|
return Declarations::EVENT_PARTICIPANTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildForm(FormBuilderInterface $builder)
|
public function buildForm(FormBuilderInterface $builder): void
|
||||||
{
|
{
|
||||||
$builder->add('part_roles', EntityType::class, [
|
$builder->add('part_roles', EntityType::class, [
|
||||||
'choices' => $this->roleRepository->findAllActive(),
|
'choices' => $this->roleRepository->findAllActive(),
|
||||||
@ -83,7 +83,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function describeAction($data, $format = 'string')
|
public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array
|
||||||
{
|
{
|
||||||
$roleNames = array_map(
|
$roleNames = array_map(
|
||||||
fn (Role $r): string => $this->translatableStringHelper->localize($r->getName()),
|
fn (Role $r): string => $this->translatableStringHelper->localize($r->getName()),
|
||||||
@ -95,12 +95,12 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface
|
|||||||
]];
|
]];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Filter by participant roles';
|
return 'Filter by participant roles';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validateForm($data, ExecutionContextInterface $context)
|
public function validateForm($data, ExecutionContextInterface $context): void
|
||||||
{
|
{
|
||||||
if (null === $data['part_roles'] || 0 === \count($data['part_roles'])) {
|
if (null === $data['part_roles'] || 0 === \count($data['part_roles'])) {
|
||||||
$context
|
$context
|
||||||
|
@ -72,14 +72,14 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
|
|||||||
*
|
*
|
||||||
* @param mixed $data the data, as returned by the user
|
* @param mixed $data the data, as returned by the user
|
||||||
*/
|
*/
|
||||||
public function validateForm($data, ExecutionContextInterface $context) {}
|
public function validateForm($data, ExecutionContextInterface $context): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a title, which will be used in UI (and translated).
|
* get a title, which will be used in UI (and translated).
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Liste des CVs par personne';
|
return 'Liste des CVs par personne';
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return Person::class;
|
return Person::class;
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
return array_keys($data['fields']);
|
return array_keys($data['fields']);
|
||||||
}
|
}
|
||||||
@ -240,7 +240,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface
|
|||||||
* @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb
|
* @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb
|
||||||
* @param mixed[] $data the data from the export's form (added by self::buildForm)
|
* @param mixed[] $data the data from the export's form (added by self::buildForm)
|
||||||
*/
|
*/
|
||||||
public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
$qb->select('person.id');
|
$qb->select('person.id');
|
||||||
|
|
||||||
|
@ -85,14 +85,14 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
|
|||||||
*
|
*
|
||||||
* @param mixed $data the data, as returned by the user
|
* @param mixed $data the data, as returned by the user
|
||||||
*/
|
*/
|
||||||
public function validateForm($data, ExecutionContextInterface $context) {}
|
public function validateForm($data, ExecutionContextInterface $context): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a title, which will be used in UI (and translated).
|
* get a title, which will be used in UI (and translated).
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Liste des freins identifiés par personne';
|
return 'Liste des freins identifiés par personne';
|
||||||
}
|
}
|
||||||
@ -169,7 +169,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return Person::class;
|
return Person::class;
|
||||||
}
|
}
|
||||||
@ -242,7 +242,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
$freins = self::FREINS;
|
$freins = self::FREINS;
|
||||||
$fields = [];
|
$fields = [];
|
||||||
@ -333,7 +333,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface
|
|||||||
* @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb
|
* @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb
|
||||||
* @param mixed[] $data the data from the export's form (added by self::buildForm)
|
* @param mixed[] $data the data from the export's form (added by self::buildForm)
|
||||||
*/
|
*/
|
||||||
public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
$qb->select('person.id');
|
$qb->select('person.id');
|
||||||
|
|
||||||
|
@ -90,14 +90,14 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
|
|||||||
*
|
*
|
||||||
* @param mixed $data the data, as returned by the user
|
* @param mixed $data the data, as returned by the user
|
||||||
*/
|
*/
|
||||||
public function validateForm($data, ExecutionContextInterface $context) {}
|
public function validateForm($data, ExecutionContextInterface $context): void {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get a title, which will be used in UI (and translated).
|
* get a title, which will be used in UI (and translated).
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTitle()
|
public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Liste des projets professionnels par personne';
|
return 'Liste des projets professionnels par personne';
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return Person::class;
|
return Person::class;
|
||||||
}
|
}
|
||||||
@ -248,7 +248,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getQueryKeys($data)
|
public function getQueryKeys($data): array
|
||||||
{
|
{
|
||||||
$projet_professionnel = self::PPROF;
|
$projet_professionnel = self::PPROF;
|
||||||
|
|
||||||
@ -371,7 +371,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn
|
|||||||
* @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb
|
* @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb
|
||||||
* @param mixed[] $data the data from the export's form (added by self::buildForm)
|
* @param mixed[] $data the data from the export's form (added by self::buildForm)
|
||||||
*/
|
*/
|
||||||
public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context)
|
public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array
|
||||||
{
|
{
|
||||||
$qb->select('person.id');
|
$qb->select('person.id');
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class CSVFormatter implements FormatterInterface, ExportManagerAwareInterface
|
|||||||
/**
|
/**
|
||||||
* @uses appendAggregatorForm
|
* @uses appendAggregatorForm
|
||||||
*/
|
*/
|
||||||
public function buildForm(FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases)
|
public function buildForm(FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases): void
|
||||||
{
|
{
|
||||||
$aggregators = $this->getExportManager()->getAggregators($aggregatorAliases);
|
$aggregators = $this->getExportManager()->getAggregators($aggregatorAliases);
|
||||||
$nb = \count($aggregatorAliases);
|
$nb = \count($aggregatorAliases);
|
||||||
@ -118,7 +118,7 @@ class CSVFormatter implements FormatterInterface, ExportManagerAwareInterface
|
|||||||
return $descriptions;
|
return $descriptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'Comma separated values (CSV)';
|
return 'Comma separated values (CSV)';
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ class CSVFormatter implements FormatterInterface, ExportManagerAwareInterface
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return 'tabular';
|
return 'tabular';
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ class CSVListFormatter implements FormatterInterface, ExportManagerAwareInterfac
|
|||||||
FormBuilderInterface $builder,
|
FormBuilderInterface $builder,
|
||||||
$exportAlias,
|
$exportAlias,
|
||||||
array $aggregatorAliases,
|
array $aggregatorAliases,
|
||||||
) {
|
): void {
|
||||||
$builder->add('numerotation', ChoiceType::class, [
|
$builder->add('numerotation', ChoiceType::class, [
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'yes' => true,
|
'yes' => true,
|
||||||
@ -99,7 +99,7 @@ class CSVListFormatter implements FormatterInterface, ExportManagerAwareInterfac
|
|||||||
return ['numerotation' => true];
|
return ['numerotation' => true];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'CSV vertical list';
|
return 'CSV vertical list';
|
||||||
}
|
}
|
||||||
@ -163,7 +163,7 @@ class CSVListFormatter implements FormatterInterface, ExportManagerAwareInterfac
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return FormatterInterface::TYPE_LIST;
|
return FormatterInterface::TYPE_LIST;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class CSVPivotedListFormatter implements FormatterInterface, ExportManagerAwareI
|
|||||||
FormBuilderInterface $builder,
|
FormBuilderInterface $builder,
|
||||||
$exportAlias,
|
$exportAlias,
|
||||||
array $aggregatorAliases,
|
array $aggregatorAliases,
|
||||||
) {
|
): void {
|
||||||
$builder->add('numerotation', ChoiceType::class, [
|
$builder->add('numerotation', ChoiceType::class, [
|
||||||
'choices' => [
|
'choices' => [
|
||||||
'yes' => true,
|
'yes' => true,
|
||||||
@ -97,7 +97,7 @@ class CSVPivotedListFormatter implements FormatterInterface, ExportManagerAwareI
|
|||||||
return ['numerotation' => true];
|
return ['numerotation' => true];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface
|
||||||
{
|
{
|
||||||
return 'CSV horizontal list';
|
return 'CSV horizontal list';
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ class CSVPivotedListFormatter implements FormatterInterface, ExportManagerAwareI
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return FormatterInterface::TYPE_LIST;
|
return FormatterInterface::TYPE_LIST;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ class SpreadSheetFormatter implements FormatterInterface, ExportManagerAwareInte
|
|||||||
FormBuilderInterface $builder,
|
FormBuilderInterface $builder,
|
||||||
$exportAlias,
|
$exportAlias,
|
||||||
array $aggregatorAliases,
|
array $aggregatorAliases,
|
||||||
) {
|
): void {
|
||||||
// choosing between formats
|
// choosing between formats
|
||||||
$builder->add('format', ChoiceType::class, [
|
$builder->add('format', ChoiceType::class, [
|
||||||
'choices' => [
|
'choices' => [
|
||||||
@ -215,7 +215,7 @@ class SpreadSheetFormatter implements FormatterInterface, ExportManagerAwareInte
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getType()
|
public function getType(): string
|
||||||
{
|
{
|
||||||
return 'tabular';
|
return 'tabular';
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user