mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
Eventlistener to create accompanyingPeriodWork
This commit is contained in:
@@ -143,7 +143,7 @@ class ActivityType extends AbstractType
|
||||
|
||||
return array_map(
|
||||
fn (string $id): ?SocialIssue => $this->om->getRepository(SocialIssue::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $socialIssuesAsString)
|
||||
explode(',', (string) $socialIssuesAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
@@ -169,7 +169,7 @@ class ActivityType extends AbstractType
|
||||
|
||||
return array_map(
|
||||
fn (string $id): ?SocialAction => $this->om->getRepository(SocialAction::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $socialActionsAsString)
|
||||
explode(',', (string) $socialActionsAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
@@ -262,7 +262,7 @@ class ActivityType extends AbstractType
|
||||
function (?string $personsAsString): array {
|
||||
return array_map(
|
||||
fn (string $id): ?Person => $this->om->getRepository(Person::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $personsAsString)
|
||||
explode(',', (string) $personsAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
@@ -284,7 +284,7 @@ class ActivityType extends AbstractType
|
||||
function (?string $thirdpartyAsString): array {
|
||||
return array_map(
|
||||
fn (string $id): ?ThirdParty => $this->om->getRepository(ThirdParty::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $thirdpartyAsString)
|
||||
explode(',', (string) $thirdpartyAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
@@ -317,7 +317,7 @@ class ActivityType extends AbstractType
|
||||
function (?string $usersAsString): array {
|
||||
return array_map(
|
||||
fn (string $id): ?User => $this->om->getRepository(User::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $usersAsString)
|
||||
explode(',', (string) $usersAsString)
|
||||
);
|
||||
}
|
||||
));
|
||||
@@ -332,7 +332,7 @@ class ActivityType extends AbstractType
|
||||
return '';
|
||||
}
|
||||
|
||||
return $location->getId();
|
||||
return (string) $location->getId();
|
||||
},
|
||||
function (?string $id): ?Location {
|
||||
return $this->om->getRepository(Location::class)->findOneBy(['id' => (int) $id]);
|
||||
@@ -379,7 +379,7 @@ class ActivityType extends AbstractType
|
||||
$timezoneUTC = new DateTimeZone('GMT');
|
||||
/** @var DateTime $data */
|
||||
$data = $formEvent->getData() === null ?
|
||||
DateTime::createFromFormat('U', 300) :
|
||||
DateTime::createFromFormat('U', '300') :
|
||||
$formEvent->getData();
|
||||
$seconds = $data->getTimezone()->getOffset($data);
|
||||
$data->setTimeZone($timezoneUTC);
|
||||
|
Reference in New Issue
Block a user