mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-09 16:24:59 +00:00
quick fixes to make calendar app work
This commit is contained in:
@@ -131,6 +131,9 @@ class CalendarType extends AbstractType
|
||||
return implode(',', $personIds);
|
||||
},
|
||||
function (?string $personsAsString): array {
|
||||
if (null === $personsAsString) {
|
||||
return [];
|
||||
}
|
||||
return array_map(
|
||||
fn (string $id): ?Person => $this->om->getRepository(Person::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $personsAsString)
|
||||
@@ -151,6 +154,9 @@ class CalendarType extends AbstractType
|
||||
return implode(',', $thirdpartyIds);
|
||||
},
|
||||
function (?string $thirdpartyAsString): array {
|
||||
if (null === $thirdpartyAsString) {
|
||||
return [];
|
||||
}
|
||||
return array_map(
|
||||
fn (string $id): ?ThirdParty => $this->om->getRepository(ThirdParty::class)->findOneBy(['id' => (int) $id]),
|
||||
explode(',', $thirdpartyAsString)
|
||||
@@ -230,6 +236,7 @@ class CalendarType extends AbstractType
|
||||
|
||||
public function getBlockPrefix()
|
||||
{
|
||||
return 'chill_calendarbundle_calendar';
|
||||
// as the js share some hardcoded items from activity, we have to rewrite block prefix
|
||||
return 'chill_activitybundle_activity';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user