mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-07 15:25:00 +00:00
improve docgen, trnslations, admin
This commit is contained in:
@@ -67,7 +67,7 @@ class AccompanyingPeriodContext implements
|
||||
}
|
||||
|
||||
public function adminFormReverseTransform(array $data): array
|
||||
{
|
||||
{dump($data);
|
||||
if (array_key_exists('category', $data)) {
|
||||
$data['category'] = [
|
||||
'idInsideBundle' => $data['category']->getIdInsideBundle(),
|
||||
@@ -80,7 +80,7 @@ class AccompanyingPeriodContext implements
|
||||
|
||||
public function adminFormTransform(array $data): array
|
||||
{
|
||||
$data = [
|
||||
$r = [
|
||||
'mainPerson' => $data['mainPerson'] ?? false,
|
||||
'mainPersonLabel' => $data['mainPersonLabel'] ?? $this->translator->trans('docgen.Main person'),
|
||||
'person1' => $data['person1'] ?? false,
|
||||
@@ -90,11 +90,11 @@ class AccompanyingPeriodContext implements
|
||||
];
|
||||
|
||||
if (array_key_exists('category', $data)) {
|
||||
$data['category'] = array_key_exists('category', $data) ?
|
||||
$r['category'] = array_key_exists('category', $data) ?
|
||||
$this->documentCategoryRepository->find($data['category']) : null;
|
||||
}
|
||||
|
||||
return $data;
|
||||
return $r;
|
||||
}
|
||||
|
||||
public function buildAdminForm(FormBuilderInterface $builder): void
|
||||
@@ -204,7 +204,7 @@ class AccompanyingPeriodContext implements
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return 'Accompanying Period basic';
|
||||
return 'docgen.Accompanying Period basic';
|
||||
}
|
||||
|
||||
public function hasAdminForm(): bool
|
||||
@@ -231,7 +231,7 @@ class AccompanyingPeriodContext implements
|
||||
->setCourse($entity)
|
||||
->setObject($storedObject);
|
||||
|
||||
if (array_key_exists('category', $template->getOptions()['category'])) {
|
||||
if (array_key_exists('category', $template->getOptions())) {
|
||||
$doc
|
||||
->setCategory(
|
||||
$this->documentCategoryRepository->find(
|
||||
|
Reference in New Issue
Block a user