mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge branch 'issue565_document_storedObject' into 'master'
storedObject: add validation in properties where it is used See merge request Chill-Projet/chill-bundles!417
This commit is contained in:
@@ -35,6 +35,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Class Activity.
|
||||
@@ -93,6 +94,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\DocStoreBundle\Entity\StoredObject", cascade={"persist"})
|
||||
* @Assert\Valid(traverse=true)
|
||||
*/
|
||||
private Collection $documents;
|
||||
|
||||
|
@@ -149,37 +149,37 @@ class StoredObject implements AsyncFileInterface, Document
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDatas(array $datas)
|
||||
public function setDatas(?array $datas)
|
||||
{
|
||||
$this->datas = $datas;
|
||||
$this->datas = (array) $datas;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFilename($filename)
|
||||
public function setFilename(?string $filename)
|
||||
{
|
||||
$this->filename = $filename;
|
||||
$this->filename = (string) $filename;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setIv(array $iv)
|
||||
public function setIv(?array $iv)
|
||||
{
|
||||
$this->iv = $iv;
|
||||
$this->iv = (array) $iv;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setKeyInfos(array $keyInfos)
|
||||
public function setKeyInfos(?array $keyInfos)
|
||||
{
|
||||
$this->keyInfos = $keyInfos;
|
||||
$this->keyInfos = (array) $keyInfos;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setType(string $type)
|
||||
public function setType(?string $type)
|
||||
{
|
||||
$this->type = $type;
|
||||
$this->type = (string) $type;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@@ -20,6 +20,7 @@ use DateTimeInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use RuntimeException;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
@@ -88,6 +89,7 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
|
||||
* @Serializer\Groups({"read"})
|
||||
* @Serializer\Groups({"write"})
|
||||
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
|
||||
* @Assert\Valid
|
||||
*/
|
||||
private ?StoredObject $storedObject = null;
|
||||
|
||||
|
Reference in New Issue
Block a user