mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Add EntityWorkflowSend and EntityWorkflowSendView entities
Introduced EntityWorkflowSend and EntityWorkflowSendView entities to enable tracking of workflow content sent to external parties. Updated EntityWorkflowStep to associate with these entities and added a corresponding database migration script.
This commit is contained in:
@@ -112,6 +112,11 @@ class EntityWorkflowStep
|
||||
#[ORM\OneToMany(mappedBy: 'step', targetEntity: EntityWorkflowStepHold::class)]
|
||||
private Collection $holdsOnStep;
|
||||
|
||||
/**
|
||||
* @var Collection<int, EntityWorkflowSend>
|
||||
*/
|
||||
private Collection $sends;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->ccUser = new ArrayCollection();
|
||||
@@ -120,6 +125,7 @@ class EntityWorkflowStep
|
||||
$this->destUserByAccessKey = new ArrayCollection();
|
||||
$this->signatures = new ArrayCollection();
|
||||
$this->holdsOnStep = new ArrayCollection();
|
||||
$this->sends = new ArrayCollection();
|
||||
$this->accessKey = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
}
|
||||
|
||||
@@ -190,6 +196,18 @@ class EntityWorkflowStep
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal use @see{EntityWorkflowSend}'s constructor instead
|
||||
*/
|
||||
public function addSend(EntityWorkflowSend $send): self
|
||||
{
|
||||
if (!$this->sends->contains($send)) {
|
||||
$this->sends[] = $send;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSignature(EntityWorkflowStepSignature $signature): self
|
||||
{
|
||||
if ($this->signatures->contains($signature)) {
|
||||
|
Reference in New Issue
Block a user