generate document with relatorio: config and driver

This commit is contained in:
2021-12-02 18:02:19 +01:00
parent 2245f83631
commit af6efdd0ba
15 changed files with 286 additions and 363 deletions

View File

@@ -20,12 +20,11 @@ use Symfony\Component\Form\FormBuilderInterface;
*/
interface DocGeneratorContextInterface
{
/**
* Get the data that will be injected to the generated document.
*
* @param mixed $entity
*/
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array;
public function adminFormReverseTransform(array $data): array;
public function adminFormTransform(array $data): array;
public function buildAdminForm(FormBuilderInterface $builder): void;
/**
* Generate the form that display.
@@ -34,11 +33,22 @@ interface DocGeneratorContextInterface
*/
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void;
/**
* Get the data that will be injected to the generated document.
*
* @param mixed $entity
*/
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array;
public function getDescription(): string;
public function getEntityClass(): string;
public static function getKey(): string;
public function getName(): string;
public function getDescription(): string;
public function hasAdminForm(): bool;
/**
* has form.
@@ -47,15 +57,5 @@ interface DocGeneratorContextInterface
*/
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool;
public function hasAdminForm(): bool;
public function buildAdminForm(FormBuilderInterface $builder): void;
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void;
public function getEntityClass(): string;
public function adminFormTransform(array $data): array;
public function adminFormReverseTransform(array $data): array;
}