Merge branch '111_exports_suite' into 641_issues_with_children

This commit is contained in:
2022-10-17 18:16:30 +02:00
99 changed files with 3043 additions and 512 deletions

View File

@@ -26,6 +26,11 @@ use Symfony\Component\Serializer\Annotation as Serializer;
*/
class Evaluation
{
/**
* @ORM\Column(type="boolean", nullable=false, options={"default": true})
*/
private bool $active = true;
/**
* @ORM\Column(type="dateinterval", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
@@ -72,6 +77,9 @@ class Evaluation
$this->socialActions = new ArrayCollection();
}
/**
* @internal do use @see{SocialAction::addEvaluation}
*/
public function addSocialAction(SocialAction $socialAction): self
{
if (!$this->socialActions->contains($socialAction)) {
@@ -111,6 +119,16 @@ class Evaluation
return $this->url;
}
public function isActive(): bool
{
return $this->active;
}
/**
* @return $this
*
* @internal do use @see{SocialAction::removeEvaluation}
*/
public function removeSocialAction(SocialAction $socialAction): self
{
if ($this->socialActions->contains($socialAction)) {
@@ -120,6 +138,13 @@ class Evaluation
return $this;
}
public function setActive(bool $active): Evaluation
{
$this->active = $active;
return $this;
}
public function setDelay(?DateInterval $delay): self
{
$this->delay = $delay;

View File

@@ -112,6 +112,7 @@ class SocialAction
{
if (!$this->evaluations->contains($evaluation)) {
$this->evaluations[] = $evaluation;
$evaluation->addSocialAction($this);
}
return $this;
@@ -332,6 +333,7 @@ class SocialAction
public function removeEvaluation(Evaluation $evaluation): self
{
$this->evaluations->removeElement($evaluation);
$evaluation->removeSocialAction($this);
return $this;
}