mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Merge branch '111_exports_suite' into 641_issues_with_children
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user