mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
30 lines
966 B
PHP
30 lines
966 B
PHP
<?php
|
|
|
|
namespace Chill\DocGeneratorBundle\Service\Generator;
|
|
|
|
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
|
use Chill\MainBundle\Entity\User;
|
|
use Symfony\Component\HttpFoundation\File\File;
|
|
|
|
interface GeneratorInterface
|
|
{
|
|
/**
|
|
* @template T of File|null
|
|
* @template B of bool
|
|
* @param B $isTest
|
|
* @param (B is true ? T : null) $testFile
|
|
* @psalm-return (B is true ? string : null)
|
|
* @throws \Symfony\Component\Serializer\Exception\ExceptionInterface|\Throwable
|
|
*/
|
|
public function generateDocFromTemplate(
|
|
DocGeneratorTemplate $template,
|
|
int $entityId,
|
|
array $contextGenerationDataNormalized,
|
|
?StoredObject $destinationStoredObject = null,
|
|
bool $isTest = false,
|
|
?File $testFile = null,
|
|
?User $creator = null
|
|
): ?string;
|
|
}
|