mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* 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.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Chill\DocGeneratorBundle\Context;
|
|
|
|
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
|
|
|
/**
|
|
* Interface for context for for document generation.
|
|
*/
|
|
interface DocGeneratorContextInterface
|
|
{
|
|
/**
|
|
* Get the data that will be injected to the generated document.
|
|
*
|
|
* @param mixed $entity
|
|
*/
|
|
public function getData($entity): array;
|
|
|
|
/**
|
|
* Generate the form that display.
|
|
*
|
|
* @param mixed $entity
|
|
*/
|
|
public function getForm($entity);
|
|
|
|
public static function getKey(): string;
|
|
|
|
public function getName(): string;
|
|
|
|
/**
|
|
* has form.
|
|
*/
|
|
public function hasForm(): bool;
|
|
|
|
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity): void;
|
|
|
|
/**
|
|
* True of false which entity supports.
|
|
*/
|
|
public function supports(string $entityClass): bool;
|
|
}
|