Feature: [docgen][stored object] handler for request generator and required fixes

This commit is contained in:
2023-02-14 23:26:00 +01:00
parent 55918bcafb
commit 91d21ba939
18 changed files with 307 additions and 110 deletions

View File

@@ -3,6 +3,7 @@
namespace Chill\DocGeneratorBundle\Service\Messenger;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Entity\User;
class RequestGenerationMessage
@@ -15,12 +16,24 @@ class RequestGenerationMessage
private string $entityClassName;
public function __construct(User $creator, DocGeneratorTemplate $template, int $entityId, string $entityClassName)
{
private int $destinationStoredObjectId;
private array $contextGenerationData;
public function __construct(
User $creator,
DocGeneratorTemplate $template,
int $entityId,
string $entityClassName,
StoredObject $destinationStoredObject,
array $contextGenerationData
) {
$this->creatorId = $creator->getId();
$this->templateId = $template->getId();
$this->entityId = $entityId;
$this->entityClassName = $entityClassName;
$this->destinationStoredObjectId = $destinationStoredObject->getId();
$this->contextGenerationData = $contextGenerationData;
}
public function getCreatorId(): int
@@ -28,6 +41,11 @@ class RequestGenerationMessage
return $this->creatorId;
}
public function getDestinationStoredObjectId(): int
{
return $this->destinationStoredObjectId;
}
public function getTemplateId(): int
{
return $this->templateId;
@@ -42,4 +60,9 @@ class RequestGenerationMessage
{
return $this->entityClassName;
}
public function getContextGenerationData(): array
{
return $this->contextGenerationData;
}
}