mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
add form to doc generation and custom form to admin template configuration
This commit is contained in:
@@ -13,9 +13,10 @@ namespace Chill\DocGeneratorBundle\Context;
|
||||
|
||||
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* Interface for context for for document generation.
|
||||
* Interface for context for document generation.
|
||||
*/
|
||||
interface DocGeneratorContextInterface
|
||||
{
|
||||
@@ -24,28 +25,37 @@ interface DocGeneratorContextInterface
|
||||
*
|
||||
* @param mixed $entity
|
||||
*/
|
||||
public function getData($entity): array;
|
||||
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array;
|
||||
|
||||
/**
|
||||
* Generate the form that display.
|
||||
*
|
||||
* @param mixed $entity
|
||||
*/
|
||||
public function getForm($entity);
|
||||
public function buildPublicForm(FormBuilderInterface $builder, DocGeneratorTemplate $template, $entity): void;
|
||||
|
||||
public static function getKey(): string;
|
||||
|
||||
public function getName(): string;
|
||||
|
||||
public function getDescription(): string;
|
||||
|
||||
/**
|
||||
* has form.
|
||||
*
|
||||
* @param mixed $entity
|
||||
*/
|
||||
public function hasForm(): bool;
|
||||
public function hasPublicForm(DocGeneratorTemplate $template, $entity): bool;
|
||||
|
||||
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity): void;
|
||||
public function hasAdminForm(): bool;
|
||||
|
||||
/**
|
||||
* True of false which entity supports.
|
||||
*/
|
||||
public function supports(string $entityClass): 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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user