Feature: show comment in #docgen generation for accompanying periods

This commit is contained in:
2022-07-11 19:56:59 +02:00
parent b3da9611ce
commit 5f6c11bde9
3 changed files with 10 additions and 4 deletions

View File

@@ -71,6 +71,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
'location' => Address::class,
'locationPerson' => Person::class,
'administrativeLocation' => Location::class,
'pinnedComment' => AccompanyingPeriod\Comment::class,
];
private ClosingMotiveRender $closingMotiveRender;
@@ -164,6 +165,8 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
'location' => $this->normalizer->normalize($period->getLocation(), $format, $addressContext),
'administrativeLocation' => $this->normalizer->normalize($period->getAdministrativeLocation(), $format, $administrativeLocationContext),
'works' => $this->normalizer->normalize($period->getWorks(), $format, $workContext),
'comments' => $this->normalizer->normalize($period->getComments(), $format, array_merge($context, ['docgen:expects' => AccompanyingPeriod\Comment::class])),
'pinnedComment' => $this->normalizer->normalize($period->getPinnedComment(), $format, array_merge($context, ['docgen:expects' => AccompanyingPeriod\Comment::class])),
];
}
@@ -183,6 +186,7 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf
'hasLocationPerson' => false,
'hasAdministrativeLocation' => false,
'works' => [],
'comments' => [],
]
);
}