Feature: [docgen][person] add a new context to generate document with a

third party

This allow to prepare, for instance, mail (letters) to a thirdparty
about a Person
This commit is contained in:
2022-10-19 14:16:59 +02:00
parent 1b5d5a28fd
commit ea5f8c9d08
6 changed files with 291 additions and 1 deletions

View File

@@ -0,0 +1,55 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\Service\DocGenerator;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithAdminFormInterface;
use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\PersonBundle\Entity\Person;
use Symfony\Component\Form\FormBuilderInterface;
interface PersonContextInterface extends DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithPublicFormInterface
{
public function adminFormReverseTransform(array $data): array;
public function adminFormTransform(array $data): array;
public function buildAdminForm(FormBuilderInterface $builder): void;
/**
* @param Person $entity
*/
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void;
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array;
public function getDescription(): string;
public function getEntityClass(): string;
public function getFormData(DocGeneratorTemplate $template, $entity): array;
public function getName(): string;
public function hasAdminForm(): bool;
/**
* @param Person $entity
*/
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool;
/**
* @param Person $entity
*/
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void;
}