mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Add attachments to workflow
This commit is contained in:
@@ -60,9 +60,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
||||
#[ORM\ManyToOne(targetEntity: DocGeneratorTemplate::class)]
|
||||
private ?DocGeneratorTemplate $template = null;
|
||||
|
||||
#[Serializer\Groups(['read', 'write', 'accompanying_period_work_evaluation:create'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
|
||||
private ?string $title = '';
|
||||
/**
|
||||
* Store the title only if the storedObject is not yet associated with the instance.
|
||||
*/
|
||||
private string $proxyTitle = '';
|
||||
|
||||
public function getAccompanyingPeriodWorkEvaluation(): ?AccompanyingPeriodWorkEvaluation
|
||||
{
|
||||
@@ -89,9 +90,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
||||
return $this->template;
|
||||
}
|
||||
|
||||
#[Serializer\Groups(['read'])]
|
||||
public function getTitle(): ?string
|
||||
{
|
||||
return $this->title;
|
||||
return (string) $this->getStoredObject()?->getTitle();
|
||||
}
|
||||
|
||||
public function setAccompanyingPeriodWorkEvaluation(?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation): AccompanyingPeriodWorkEvaluationDocument
|
||||
@@ -125,6 +127,10 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
||||
{
|
||||
$this->storedObject = $storedObject;
|
||||
|
||||
if ('' !== $this->proxyTitle) {
|
||||
$this->storedObject->setTitle($this->proxyTitle);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -135,9 +141,14 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setTitle(?string $title): AccompanyingPeriodWorkEvaluationDocument
|
||||
#[Serializer\Groups(['write', 'accompanying_period_work_evaluation:create'])]
|
||||
public function setTitle(?string $proxyTitle): AccompanyingPeriodWorkEvaluationDocument
|
||||
{
|
||||
$this->title = $title;
|
||||
if (null !== $this->storedObject) {
|
||||
$this->storedObject->setTitle((string) $proxyTitle);
|
||||
} else {
|
||||
$this->proxyTitle = (string) $proxyTitle;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user