mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
resolve data Transformer in ActivityType (persons/thirdparties/users)
This commit is contained in:
@@ -130,13 +130,13 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
* @ORM\ManyToMany(targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private Collection $persons;
|
||||
private ?Collection $persons = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private Collection $thirdParties;
|
||||
private ?Collection $thirdParties = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToMany(targetEntity="Chill\DocStoreBundle\Entity\StoredObject")
|
||||
@@ -147,7 +147,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
* @ORM\ManyToMany(targetEntity="Chill\MainBundle\Entity\User")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private Collection $users;
|
||||
private ?Collection $users = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=false})
|
||||
@@ -351,17 +351,18 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this->persons;
|
||||
}
|
||||
|
||||
public function setPersons(Collection $persons): self
|
||||
public function setPersons(?Collection $persons): self
|
||||
{
|
||||
$this->persons = $persons;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addThirdParty(ThirdParty $thirdParty): self
|
||||
public function addThirdParty(?ThirdParty $thirdParty): self
|
||||
{
|
||||
$this->thirdParties[] = $thirdParty;
|
||||
|
||||
if (null !== $thirdParty) {
|
||||
$this->thirdParties[] = $thirdParty;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -375,7 +376,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this->thirdParties;
|
||||
}
|
||||
|
||||
public function setThirdParties(Collection $thirdParties): self
|
||||
public function setThirdParties(?Collection $thirdParties): self
|
||||
{
|
||||
$this->thirdParties = $thirdParties;
|
||||
|
||||
@@ -406,10 +407,11 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addUser(User $user): self
|
||||
public function addUser(?User $user): self
|
||||
{
|
||||
$this->users[] = $user;
|
||||
|
||||
if (null !== $user) {
|
||||
$this->users[] = $user;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -423,7 +425,7 @@ class Activity implements HasCenterInterface, HasScopeInterface
|
||||
return $this->users;
|
||||
}
|
||||
|
||||
public function setUsers(Collection $users): self
|
||||
public function setUsers(?Collection $users): self
|
||||
{
|
||||
$this->users = $users;
|
||||
|
||||
|
Reference in New Issue
Block a user