Adding context

This commit is contained in:
Marc Ducobu
2021-08-12 23:55:01 +02:00
parent 8df4c93c97
commit cbdf976885
5 changed files with 174 additions and 2 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Chill\DocGeneratorBundle\Context;
/**
* Interface for context for for document generation
*/
interface DocGeneratorContextInterface
{
/**
* has form
*/
public function hasForm(): bool;
/**
* Generate the form that display
*/
public function getForm($entity);
/**
* True of false which entity supports
*/
public function supports(string $entityClass): bool;
/**
* Get the data that will be injected to the generated document
*/
public function getData($entity): array;
}