Commit e31477ea by Damien Moulard

Fix bug creation prestataires avec contact depuis admin

parent e8a2e43d
......@@ -189,13 +189,16 @@ class Comptoir
$this->contacts = $contacts;
return $this;
}
/**
* @param ContactComptoir $contact
* @return $this
*/
public function addContact(ContactComptoir $contact): self
{
if (is_null($this->contacts)) {
$this->contacts = new ArrayCollection();
}
if (!$this->contacts->contains($contact)) {
$this->contacts[] = $contact;
$contact->setComptoir($this);
......
......@@ -203,7 +203,7 @@ class Prestataire
* @Groups({"read", "write"})
*/
private $groupeprestataires;
/**
* EtatPrestataire $etats
* @var ArrayCollection|EtatPrestataire[]
......@@ -421,7 +421,7 @@ class Prestataire
$this->geolocs = $geolocs;
return $this;
}
/**
* @param GeolocPrestataire $geoloc
* @return $this
......@@ -466,13 +466,16 @@ class Prestataire
$this->contacts = $contacts;
return $this;
}
/**
* @param ContactPrestataire $contact
* @return $this
*/
public function addContact(ContactPrestataire $contact): self
{
if (is_null($this->contacts)) {
$this->contacts = new ArrayCollection();
}
if (!$this->contacts->contains($contact)) {
$this->contacts[] = $contact;
$contact->setPrestataire($this);
......@@ -500,7 +503,7 @@ class Prestataire
{
return $this->users;
}
public function getUsersString()
{
return join(' - ', array_map(function ($user) {
......@@ -673,7 +676,7 @@ class Prestataire
{
return $this->etats;
}
public function getEtatsString(): ?string
{
return join(' - ', array_map(function ($etat) {
......@@ -763,7 +766,7 @@ class Prestataire
{
return $this->tauxreconversion;
}
/**
* Set tauxreconversion
* @return $this
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment