periodContext = $periodContext; $this->normalizer = $normalizer; } public function adminFormReverseTransform(array $data): array { return $this->periodContext->adminFormReverseTransform($data); } public function adminFormTransform(array $data): array { return $this->periodContext->adminFormTransform($data); } public function buildAdminForm(FormBuilderInterface $builder): void { $this->periodContext->buildAdminForm($builder); $builder->remove('category'); } /** * @param AccompanyingPeriodWork $entity */ public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void { $this->periodContext->buildPublicForm($builder, $template, $entity->getAccompanyingPeriod()); } /** * @param AccompanyingPeriodWork $entity */ public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array { $data = $this->periodContext->getData($template, $entity->getAccompanyingPeriod(), $contextGenerationData); $data['work'] = $this->normalizer->normalize($entity, 'docgen', [ AbstractNormalizer::GROUPS => ['docgen:read'], 'docgen:expects' => AccompanyingPeriodWork::class, ]); return $data; } public function getDescription(): string { return 'docgen.A context for accompanying period work'; } public function getEntityClass(): string { return AccompanyingPeriodWork::class; } /** * @param AccompanyingPeriodWork $entity */ public function getFormData(DocGeneratorTemplate $template, $entity): array { return $this->periodContext->getFormData($template, $entity->getAccompanyingPeriod()); } public static function getKey(): string { return 'accompanying_period_work_regular'; } public function getName(): string { return 'docgen.Accompanying period work'; } public function hasAdminForm(): bool { return $this->periodContext->hasAdminForm(); } public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool { return $this->periodContext->hasPublicForm($template, $entity); } public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void { // TODO: Implement storeGenerated() method. } }