mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
Implements return types on aggregators
This commit is contained in:
@@ -67,7 +67,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -60,7 +60,7 @@ class ByActionNumberAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return static function ($value) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -61,7 +61,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function (?string $value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -63,7 +63,7 @@ class ClosingMotiveAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -62,7 +62,7 @@ class ConfidentialAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -100,7 +100,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -85,7 +85,7 @@ final readonly class DurationAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return static function ($value) use ($data) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -62,7 +62,7 @@ class EmergencyAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -71,7 +71,7 @@ final readonly class EvaluationAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -149,7 +149,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
|
||||
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return match ($key) {
|
||||
'acp_geog_agg_unitname' => static function ($value): string {
|
||||
|
@@ -62,7 +62,7 @@ class IntensityAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -94,7 +94,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function (int|string|null $jobId) {
|
||||
if (null === $jobId || '' === $jobId) {
|
||||
|
@@ -61,7 +61,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function (?string $value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -76,7 +76,7 @@ final readonly class OriginAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -50,7 +50,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return match ($key) {
|
||||
self::KEY => $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.course.by-user.header'),
|
||||
|
@@ -117,7 +117,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -123,7 +123,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -83,7 +83,7 @@ final readonly class RequestorAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -67,7 +67,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -94,7 +94,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function (int|string|null $scopeId) {
|
||||
if (null === $scopeId || '' === $scopeId) {
|
||||
|
@@ -68,7 +68,7 @@ final readonly class SocialActionAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -68,7 +68,7 @@ final readonly class SocialIssueAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -88,7 +88,7 @@ final readonly class StepAggregator implements AggregatorInterface
|
||||
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
switch ($value) {
|
||||
|
@@ -123,7 +123,7 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -54,7 +54,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
public function getLabels($key, array $values, $data): closure
|
||||
{
|
||||
return function (int|string|null $userId) {
|
||||
if (null === $userId || '' === $userId) {
|
||||
|
@@ -52,7 +52,7 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function (int|string|null $value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -59,7 +59,7 @@ final readonly class ByDateAggregator implements AggregatorInterface
|
||||
return ['frequency' => DateGroupingChoiceEnum::YEAR->value];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function (?string $value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -54,7 +54,7 @@ final readonly class ByStepAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function (?string $step): string {
|
||||
if ('_header' === $step) {
|
||||
|
@@ -81,7 +81,7 @@ final class ByEndDateAggregator implements AggregatorInterface
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return static function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -81,7 +81,7 @@ final class ByMaxDateAggregator implements AggregatorInterface
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return static function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -81,7 +81,7 @@ final class ByStartDateAggregator implements AggregatorInterface
|
||||
return ['frequency' => self::DEFAULT_CHOICE];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return static function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -63,7 +63,7 @@ class EvaluationTypeAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -63,7 +63,7 @@ class HavingEndDateAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -83,7 +83,7 @@ class ChildrenNumberAggregator implements AggregatorInterface
|
||||
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return static function (int|string|null $value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -85,7 +85,7 @@ class CompositionAggregator implements AggregatorInterface
|
||||
return ['on_date' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -62,7 +62,7 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -70,7 +70,7 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement
|
||||
return ['date_age_calculation' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -103,7 +103,7 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface
|
||||
return ['date_calc' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -58,7 +58,7 @@ final readonly class CenterAggregator implements AggregatorInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data): \Closure
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function (int|string|null $value) {
|
||||
if (null === $value || '' === $value) {
|
||||
|
@@ -112,7 +112,7 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
$labels = [];
|
||||
|
||||
|
@@ -62,7 +62,7 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -63,7 +63,7 @@ final readonly class GenderAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function (int|string|null $value) {
|
||||
if (null === $value || '' === $value) {
|
||||
|
@@ -127,7 +127,7 @@ final readonly class GeographicalUnitAggregator implements AggregatorInterface
|
||||
return 'person_geog_agg';
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return match ($key) {
|
||||
'geog_unit_name' => static function ($value): string {
|
||||
|
@@ -94,7 +94,7 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface,
|
||||
return ['date_position' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value) {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -67,7 +67,7 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -109,7 +109,7 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor
|
||||
];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
$labels = [];
|
||||
|
||||
|
@@ -56,7 +56,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface
|
||||
return ['calc_date' => new RollingDate(RollingDate::T_TODAY)];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function (int|string|null $value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -76,7 +76,7 @@ final readonly class ActionTypeAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return match ($key) {
|
||||
'action_type_aggregator' => function ($value): string {
|
||||
|
@@ -68,7 +68,7 @@ class CreatorAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -85,7 +85,7 @@ class CreatorJobAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -85,7 +85,7 @@ class CreatorScopeAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -66,7 +66,7 @@ class CurrentActionAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -67,7 +67,7 @@ final readonly class GoalAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -73,7 +73,7 @@ class GoalResultAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value) use ($key): string {
|
||||
if (null === $value || '' === $value) {
|
||||
|
@@ -52,7 +52,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, mixed $data)
|
||||
public function getLabels($key, array $values, mixed $data): callable
|
||||
{
|
||||
return $this->labelThirdPartyHelper->getLabel($key, $values, 'export.aggregator.course_work.by_handling_third_party.header');
|
||||
}
|
||||
|
@@ -80,7 +80,7 @@ final readonly class JobAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -85,7 +85,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -67,7 +67,7 @@ final readonly class ResultAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -80,7 +80,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getLabels($key, array $values, $data)
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
return function ($value): string {
|
||||
if ('_header' === $value) {
|
||||
|
@@ -26,6 +26,7 @@ use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
|
||||
class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
@@ -102,9 +103,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface
|
||||
return $query->getQuery()->getResult(Query::HYDRATE_SCALAR);
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
public function getTitle(): TranslatableMessage
|
||||
{
|
||||
return 'Count accompanying courses';
|
||||
return new TranslatableMessage('Count accompanying courses');
|
||||
}
|
||||
|
||||
public function getType(): string
|
||||
|
@@ -21,6 +21,7 @@ use Doctrine\ORM\Query\Expr\Join;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
|
||||
final readonly class CreatorJobFilter implements FilterInterface
|
||||
{
|
||||
@@ -114,19 +115,19 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
return ['creator_job' => $this->denormalizeDoctrineEntity($formData['creator_job'], $this->userJobRepository)];
|
||||
}
|
||||
|
||||
public function describeAction($data, $format = 'string'): array
|
||||
public function describeAction($data, $format = 'string'): TranslatableMessage
|
||||
{
|
||||
$creatorJobs = [];
|
||||
|
||||
foreach ($data['creator_job'] as $j) {
|
||||
$creatorJobs[] = $this->translatableStringHelper->localize(
|
||||
$j->getLabel()
|
||||
$j->getLabel(),
|
||||
);
|
||||
}
|
||||
|
||||
return ['export.filter.course.creator_job.Filtered by creator job: only %jobs%', [
|
||||
return new TranslatableMessage('export.filter.course.creator_job.Filtered by creator job: only %jobs%', [
|
||||
'%jobs%' => implode(', ', $creatorJobs),
|
||||
]];
|
||||
]);
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
@@ -136,8 +137,8 @@ final readonly class CreatorJobFilter implements FilterInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
public function getTitle(): TranslatableMessage
|
||||
{
|
||||
return 'export.filter.course.creator_job.Filter by creator job';
|
||||
return new TranslatableMessage('export.filter.course.creator_job.Filter by creator job');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user