src/Entity/Adherent/Magasin.php line 35

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Adherent;
  3. use App\Entity\Adherent\Annuaire\MagasinContact;
  4. use App\Entity\Adherent\Annuaire\MagasinContactQualifier;
  5. use App\Entity\Alertes\MagasinMarquesAlertes;
  6. use App\Entity\Crm\CrmResponseIa;
  7. use App\Entity\Crm\CrmSettings;
  8. use App\Entity\EvenementsGroupeAll\AvisEvenement;
  9. use App\Entity\ImagePartner;
  10. use App\Entity\Kpi\KpiObjectifs;
  11. use App\Entity\Kpi\KpiParameters;
  12. use App\Entity\Retrocession\Annonce;
  13. use App\Entity\VenteRechercheMagasins\VenteRechercheMagasinsAlertes;
  14. use App\Entity\Webfactory\Navigation;
  15. use App\Entity\Webfactory\Page\PageAbstract;
  16. use App\Entity\Webfactory\SeoVilles;
  17. use App\Entity\Webfactory\Widget\Createur\Faq;
  18. use App\Entity\Webfactory\Widget\WidgetAbstract;
  19. use App\Entity\Webfactory\Widget\WidgetContent;
  20. use App\Repository\Adherent\MagasinRepository;
  21. use DateTimeImmutable;
  22. use Doctrine\Common\Collections\ArrayCollection;
  23. use Doctrine\Common\Collections\Collection;
  24. use Doctrine\ORM\Mapping as ORM;
  25. use Stringable;
  26. use Symfony\Component\Serializer\Annotation\Groups;
  27. #[ORM\Table(name'magasin')]
  28. #[ORM\Index(columns: ['k_adherent'], name'k_adherent')]
  29. #[ORM\Index(columns: ['k_mag'], name'k_mag')]
  30. #[ORM\Entity(repositoryClassMagasinRepository::class)]
  31. #[ORM\HasLifecycleCallbacks]
  32. class Magasin implements Stringable
  33. {
  34.     #[ORM\Id]
  35.     #[ORM\GeneratedValue('NONE')]
  36.     #[ORM\Column(type'string'length255)]
  37.     #[Groups(groups: ['contact_history'])]
  38.     private string $k_adherent;
  39.     /**
  40.      * Unique = false car un adhérent peut faire une reprise de magasin
  41.      */
  42.     #[ORM\Column(type'string'length255uniquefalse)]
  43.     private string $k_mag;
  44.     #[ORM\Column(type'string'length255nullabletrue)]
  45.     private ?string $siret;
  46.     #[ORM\Column(type'string'length255nullabletrue)]
  47.     private ?string $siren;
  48.     #[ORM\Column(type'string'length255)]
  49.     private ?string $lib;
  50.     #[ORM\Column(type'string'length255)]
  51.     private ?string $k_pays;
  52.     #[ORM\Column(type'string'length255)]
  53.     private ?string $k_langue;
  54.     #[ORM\Column(type'string'length255nullabletrue)]
  55.     private ?string $lat;
  56.     #[ORM\Column(type'string'length255nullabletrue)]
  57.     private ?string $lon;
  58.     #[ORM\Column(type'string'length255nullabletrue)]
  59.     private ?string $k_user_suivi;
  60.     #[ORM\Column(type'string'length255nullabletrue)]
  61.     private ?string $k_logiciel;
  62.     #[ORM\Column(type'datetime_immutable')]
  63.     private DateTimeImmutable $createdAt;
  64.     #[ORM\Column(type'boolean')]
  65.     private ?bool $updated;
  66.     #[ORM\Column(type'boolean'nullabletrue)]
  67.     private ?bool $deleted;
  68.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  69.     private ?DateTimeImmutable $deletedAt;
  70.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinCoordonnees::class)]
  71.     private $magasinCoordonnees;
  72.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinHoraires::class)]
  73.     private $magasinHoraires;
  74.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinHorairesExceptionnelles::class)]
  75.     private $magasinHorairesExceptionnelles;
  76.     #[ORM\Column(type'string'length255nullabletrue)]
  77.     private ?string $ADH_MM;
  78.     #[ORM\Column(type'string'length255nullabletrue)]
  79.     private ?string $K_NIVEAUADH;
  80.     #[ORM\Column(type'string'length255nullabletrue)]
  81.     private ?string $K_TYPE_CLIENT;
  82.     #[ORM\Column(type'boolean'nullabletrue)]
  83.     private ?bool $L_BLACKLIST;
  84.     #[ORM\OneToMany(mappedBy'k_adherent'targetEntityMagasinConviction::class)]
  85.     private $magasinConvictions;
  86.     #[ORM\Column(type'string'length255nullabletrue)]
  87.     private ?string $user_rs;
  88.     #[ORM\Column(type'string'length255nullabletrue)]
  89.     private ?string $user_cpv;
  90.     #[ORM\Column(type'string'length255nullabletrue)]
  91.     private ?string $user_adv;
  92.     #[ORM\Column(type'string'length255nullabletrue)]
  93.     private ?string $user_achat;
  94.     #[ORM\Column(type'string'length255nullabletrue)]
  95.     private ?string $user_paiement;
  96.     #[ORM\Column(type'string'length255nullabletrue)]
  97.     private ?string $user_op;
  98.     #[ORM\Column(type'string'length255nullabletrue)]
  99.     private ?string $user_cpv_conf;
  100.     #[ORM\Column(type'string'length255nullabletrue)]
  101.     private ?string $ADH_SITE_WEB// plus utilisé, se trouve dans magasin_url -> type = siteweb
  102.     #[ORM\Column(name'adh_crm'type'string'length11nullabletrue)]
  103.     private ?string $adhCrm null;
  104.     #[ORM\JoinTable(name'magasin_services')]
  105.     #[ORM\JoinColumn(name'k_adherent'referencedColumnName'k_adherent')]
  106.     #[ORM\InverseJoinColumn(name'service_id'referencedColumnName'id')]
  107.     #[ORM\ManyToMany(targetEntityService::class, inversedBy'magasins')]
  108.     private $services;
  109.     #[ORM\JoinTable(name'magasin_specialites')]
  110.     #[ORM\JoinColumn(name'k_adherent'referencedColumnName'k_adherent')]
  111.     #[ORM\InverseJoinColumn(name'specialite_id'referencedColumnName'id')]
  112.     #[ORM\ManyToMany(targetEntitySpecialite::class, inversedBy'magasins')]
  113.     private $specialites;
  114.     /**
  115.      * @var Complement[]
  116.      */
  117.     #[ORM\JoinTable(name'magasin_complements')]
  118.     #[ORM\JoinColumn(name'k_adherent'referencedColumnName'k_adherent')]
  119.     #[ORM\InverseJoinColumn(name'complement_id'referencedColumnName'id')]
  120.     #[ORM\ManyToMany(targetEntityComplement::class, inversedBy'magasins')]
  121.     private $complements;
  122.     /**
  123.      * @var OperateursRemboursement[]
  124.      */
  125.     #[ORM\JoinTable(name'magasin_operateurs')]
  126.     #[ORM\JoinColumn(name'k_adherent'referencedColumnName'k_adherent')]
  127.     #[ORM\InverseJoinColumn(name'operateur_id'referencedColumnName'id')]
  128.     #[ORM\ManyToMany(targetEntityOperateursRemboursement::class, inversedBy'magasins')]
  129.     private $operateursRemboursement;
  130.     #[ORM\OneToMany(mappedBy'magasin'targetEntityWidgetAbstract::class)]
  131.     private $widgetAbstracts;
  132.     #[ORM\OneToMany(mappedBy'magasin'targetEntityPageAbstract::class)]
  133.     private $pageAbstracts;
  134.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinCollaborateurs::class)]
  135.     private $magasinCollaborateurs;
  136.     #[ORM\OneToOne(mappedBy'magasin'targetEntityMagasinEquipe::class)]
  137.     private mixed $magasinEquipe;
  138.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinMarques::class)]
  139.     private $magasinMarques;
  140.     #[ORM\OneToMany(mappedBy'magasin'targetEntityNavigation::class)]
  141.     private $navigations;
  142.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinUrl::class)]
  143.     private $magasinUrl;
  144.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinJuridique::class)]
  145.     private $magasinJuridiques;
  146.     #[ORM\Column(type'string'length255nullabletrue)]
  147.     private mixed $adhMmStat;
  148.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinContact::class, cascade: ['persist''remove'])]
  149.     private $magasinContacts;
  150.     #[ORM\Column(type'boolean')]
  151.     private mixed $packOpc;
  152.     #[ORM\Column(type'string'length255nullabletrue)]
  153.     private mixed $centrale;
  154.     #[ORM\OneToMany(mappedBy'magasin'targetEntityAnnonce::class)]
  155.     private $annonces;
  156.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinAlert::class)]
  157.     private Collection $magasinAlerts;
  158.     #[ORM\Column(type'boolean'nullablefalse)]
  159.     private bool $wantFacturationPapier false;
  160.     #[ORM\Column(type'boolean'nullablefalse)]
  161.     private bool $avisGmbActive false;
  162.     #[ORM\Column(type'boolean')]
  163.     private bool $affAvisCrmOpc false// Affichage des avis CRM sur OPC
  164.     #[ORM\OneToMany(mappedBy'k_adherent'targetEntityMagasinMarquesAlertes::class)]
  165.     private Collection $magasinMarquesAlertes;
  166.     #[ORM\OneToMany(mappedBy'magasin'targetEntityVenteRechercheMagasinsAlertes::class)]
  167.     private Collection $venteRechercheMagasinsAlertes;
  168.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinConsentements::class)]
  169.     private Collection $consentements;
  170.     #[ORM\OneToMany(mappedBy'k_adh'targetEntityAvisEvenement::class)]
  171.     private Collection $avis35ans;
  172.     # J'accepte que mes services, spécialités et informations complémentaires soient visibles sur les différentes plateformes web du Groupe all.
  173.     #[ORM\Column(type'boolean')]
  174.     private mixed $consentServSpecInfoComple;
  175.     #[ORM\OneToMany(mappedBy'magasin'targetEntityMagasinReseaux::class, cascade: ['persist''remove'])]
  176.     private $magasinReseaux;
  177.     #[ORM\Column(type'text'nullabletrue)]
  178.     private mixed $convictionFr;
  179.     #[ORM\Column(type'text'nullabletrue)]
  180.     private mixed $convictionNl;
  181.     #[ORM\OneToMany(mappedBy'magasin'targetEntitySeoVilles::class)]
  182.     private Collection $seoVilles;
  183.     #[ORM\OneToMany(mappedBy'magasin'targetEntityImagePartner::class)]
  184.     private Collection $imagePartners;
  185.     #[ORM\OneToMany(mappedBy'magasin'targetEntityKpiParameters::class, cascade: ['persist''remove'])]
  186.     private Collection $exercices;
  187.     #[ORM\OneToMany(mappedBy'magasin'targetEntityKpiObjectifs::class, cascade: ['persist''remove'])]
  188.     private Collection $kpiObjectifs;
  189.     #[ORM\OneToOne(mappedBy'magasin'cascade: ['persist''remove'])]
  190.     private ?CrmSettings $crmSettings null;
  191.     #[ORM\OneToMany(mappedBy'magasin'targetEntityCrmResponseIa::class)]
  192.     private Collection $crmResponseIas;
  193.     public function __construct()
  194.     {
  195.         $this->createdAt = new DateTimeImmutable('now');
  196.         $this->magasinCoordonnees = new ArrayCollection();
  197.         $this->magasinHoraires = new ArrayCollection();
  198.         $this->magasinHorairesExceptionnelles = new ArrayCollection();
  199.         $this->magasinConvictions = new ArrayCollection();
  200.         $this->services = new ArrayCollection();
  201.         $this->specialites = new ArrayCollection();
  202.         $this->complements = new ArrayCollection();
  203.         $this->operateursRemboursement = new ArrayCollection();
  204.         $this->widgetAbstracts = new ArrayCollection();
  205.         $this->pageAbstracts = new ArrayCollection();
  206.         $this->magasinCollaborateurs = new ArrayCollection();
  207.         $this->magasinMarques = new ArrayCollection();
  208.         $this->navigations = new ArrayCollection();
  209.         $this->magasinJuridiques = new ArrayCollection();
  210.         $this->magasinContacts = new ArrayCollection();
  211.         $this->annonces = new ArrayCollection();
  212.         $this->magasinAlerts = new ArrayCollection();
  213.         $this->magasinMarquesAlertes = new ArrayCollection();
  214.         $this->consentements = new ArrayCollection();
  215.         $this->avis35ans = new ArrayCollection();
  216.         $this->magasinReseaux = new ArrayCollection();
  217.         $this->consentServSpecInfoComple false;
  218.         $this->seoVilles = new ArrayCollection();
  219.         $this->lang = new ArrayCollection();
  220.         $this->crmResponseIas = new ArrayCollection();
  221.         $this->exercices = new ArrayCollection();
  222.         $this->kpiObjectifs = new ArrayCollection();
  223.     }
  224.     public function __toString(): string
  225.     {
  226.         return ($this->k_adherent ' - ' $this->getLib());
  227.     }
  228.     public function setKAdherent($adherent)
  229.     {
  230.         $this->k_adherent $adherent;
  231.         return $this;
  232.     }
  233.     public function getKAdherent(): ?string
  234.     {
  235.         return $this->k_adherent;
  236.     }
  237.     public function getKMag(): ?string
  238.     {
  239.         return $this->k_mag;
  240.     }
  241.     public function setKMag(string $k_mag): self
  242.     {
  243.         $this->k_mag $k_mag;
  244.         return $this;
  245.     }
  246.     public function getSiret(): ?string
  247.     {
  248.         return $this->siret;
  249.     }
  250.     public function setSiret(?string $siret): self
  251.     {
  252.         $this->siret $siret;
  253.         return $this;
  254.     }
  255.     public function getSiren(): ?string
  256.     {
  257.         return $this->siren;
  258.     }
  259.     public function setSiren(?string $siren): self
  260.     {
  261.         $this->siren $siren;
  262.         return $this;
  263.     }
  264.     public function getLib(): ?string
  265.     {
  266.         return $this->lib;
  267.     }
  268.     public function setLib(string $lib): self
  269.     {
  270.         $this->lib $lib;
  271.         return $this;
  272.     }
  273.     public function getKPays(): ?string
  274.     {
  275.         return $this->k_pays;
  276.     }
  277.     public function setKPays(string $k_pays): self
  278.     {
  279.         $this->k_pays $k_pays;
  280.         return $this;
  281.     }
  282.     public function getKLangue(): ?string
  283.     {
  284.         return $this->k_langue;
  285.     }
  286.     public function setKLangue(string $k_langue): self
  287.     {
  288.         $this->k_langue $k_langue;
  289.         return $this;
  290.     }
  291.     public function getLat(): ?string
  292.     {
  293.         return $this->lat;
  294.     }
  295.     public function setLat(?string $lat): self
  296.     {
  297.         $this->lat $lat;
  298.         return $this;
  299.     }
  300.     public function getLon(): ?string
  301.     {
  302.         return $this->lon;
  303.     }
  304.     public function setLon(?string $lon): self
  305.     {
  306.         $this->lon $lon;
  307.         return $this;
  308.     }
  309.     public function getKUserSuivi(): ?string
  310.     {
  311.         return $this->k_user_suivi;
  312.     }
  313.     public function setKUserSuivi(?string $k_user_suivi): self
  314.     {
  315.         $this->k_user_suivi $k_user_suivi;
  316.         return $this;
  317.     }
  318.     public function getKLogiciel(): ?string
  319.     {
  320.         return $this->k_logiciel;
  321.     }
  322.     public function setKLogiciel(?string $k_logiciel): self
  323.     {
  324.         $this->k_logiciel $k_logiciel;
  325.         return $this;
  326.     }
  327.     public function getCreatedAt(): ?DateTimeImmutable
  328.     {
  329.         return $this->createdAt;
  330.     }
  331.     public function setCreatedAt(DateTimeImmutable $createdAt): self
  332.     {
  333.         $this->createdAt $createdAt;
  334.         return $this;
  335.     }
  336.     public function getUpdated(): ?bool
  337.     {
  338.         return $this->updated;
  339.     }
  340.     public function setUpdated(bool $updated): self
  341.     {
  342.         $this->updated $updated;
  343.         return $this;
  344.     }
  345.     public function getDeleted(): ?bool
  346.     {
  347.         return $this->deleted;
  348.     }
  349.     public function setDeleted(?bool $deleted): self
  350.     {
  351.         $this->deleted $deleted;
  352.         return $this;
  353.     }
  354.     public function getDeletedAt(): ?DateTimeImmutable
  355.     {
  356.         return $this->deletedAt;
  357.     }
  358.     public function setDeletedAt(?DateTimeImmutable $deletedAt): self
  359.     {
  360.         $this->deletedAt $deletedAt;
  361.         return $this;
  362.     }
  363.     public function getADHMM(): ?string
  364.     {
  365.         return $this->ADH_MM;
  366.     }
  367.     public function setADHMM(?string $ADH_MM): self
  368.     {
  369.         $this->ADH_MM $ADH_MM;
  370.         return $this;
  371.     }
  372.     public function getKNIVEAUADH(): ?string
  373.     {
  374.         return $this->K_NIVEAUADH;
  375.     }
  376.     public function setKNIVEAUADH(?string $K_NIVEAUADH): self
  377.     {
  378.         $this->K_NIVEAUADH $K_NIVEAUADH;
  379.         return $this;
  380.     }
  381.     public function getKTYPECLIENT(): ?string
  382.     {
  383.         return $this->K_TYPE_CLIENT;
  384.     }
  385.     public function setKTYPECLIENT(?string $K_TYPE_CLIENT): self
  386.     {
  387.         $this->K_TYPE_CLIENT $K_TYPE_CLIENT;
  388.         return $this;
  389.     }
  390.     public function getLBLACKLIST(): ?bool
  391.     {
  392.         return $this->L_BLACKLIST;
  393.     }
  394.     public function setLBLACKLIST(?bool $L_BLACKLIST): self
  395.     {
  396.         $this->L_BLACKLIST $L_BLACKLIST;
  397.         return $this;
  398.     }
  399.     public function getUserRs(): ?string
  400.     {
  401.         return $this->user_rs;
  402.     }
  403.     public function setUserRs(?string $user_rs): self
  404.     {
  405.         $this->user_rs $user_rs;
  406.         return $this;
  407.     }
  408.     public function getUserCpv(): ?string
  409.     {
  410.         return $this->user_cpv;
  411.     }
  412.     public function setUserCpv(?string $user_cpv): self
  413.     {
  414.         $this->user_cpv $user_cpv;
  415.         return $this;
  416.     }
  417.     public function getUserAdv(): ?string
  418.     {
  419.         return $this->user_adv;
  420.     }
  421.     public function setUserAdv(?string $user_adv): self
  422.     {
  423.         $this->user_adv $user_adv;
  424.         return $this;
  425.     }
  426.     public function getUserAchat(): ?string
  427.     {
  428.         return $this->user_achat;
  429.     }
  430.     public function setUserAchat(?string $user_achat): self
  431.     {
  432.         $this->user_achat $user_achat;
  433.         return $this;
  434.     }
  435.     public function getUserPaiement(): ?string
  436.     {
  437.         return $this->user_paiement;
  438.     }
  439.     public function setUserPaiement(?string $user_paiement): self
  440.     {
  441.         $this->user_paiement $user_paiement;
  442.         return $this;
  443.     }
  444.     public function getUserOp(): ?string
  445.     {
  446.         return $this->user_op;
  447.     }
  448.     public function setUserOp(?string $user_op): self
  449.     {
  450.         $this->user_op $user_op;
  451.         return $this;
  452.     }
  453.     public function getUserCpvConf(): ?string
  454.     {
  455.         return $this->user_cpv_conf;
  456.     }
  457.     public function setUserCpvConf(?string $user_cpv_conf): self
  458.     {
  459.         $this->user_cpv_conf $user_cpv_conf;
  460.         return $this;
  461.     }
  462.     public function getADHSITEWEB(): ?string
  463.     {
  464.         return $this->ADH_SITE_WEB;
  465.     }
  466.     public function setADHSITEWEB(?string $ADH_SITE_WEB): self
  467.     {
  468.         $this->ADH_SITE_WEB $ADH_SITE_WEB;
  469.         return $this;
  470.     }
  471.     public function getMagasinCoordonnees($type null)
  472.     {
  473.         // Retourne directement le type d'adresse souhaité
  474.         $allow = ['MARKETING''MAGASIN''SIEGE'];
  475.         if (!is_null($type)) {
  476.             $adresse = [];
  477.             if (in_array($type$allow)) {
  478.                 foreach ($this->magasinCoordonnees as $adresse) {
  479.                     if ($adresse->getType() == strtoupper((string)$type)) {
  480.                         return $adresse;
  481.                     }
  482.                 }
  483.                 return $adresse;
  484.             } else {
  485.                 return null;
  486.             }
  487.             return null;
  488.         }
  489.         // Sinon on retourne toute la collection
  490.         return $this->magasinCoordonnees;
  491.     }
  492.     public function addMagasinCoordonnee(MagasinCoordonnees $magasinCoordonnee): self
  493.     {
  494.         if (!$this->magasinCoordonnees->contains($magasinCoordonnee)) {
  495.             $this->magasinCoordonnees[] = $magasinCoordonnee;
  496.             $magasinCoordonnee->setMagasin($this);
  497.         }
  498.         return $this;
  499.     }
  500.     public function removeMagasinCoordonnee(MagasinCoordonnees $magasinCoordonnee): self
  501.     {
  502.         if ($this->magasinCoordonnees->removeElement($magasinCoordonnee)) {
  503.             // set the owning side to null (unless already changed)
  504.             if ($magasinCoordonnee->getMagasin() === $this) {
  505.                 $magasinCoordonnee->setMagasin(null);
  506.             }
  507.         }
  508.         return $this;
  509.     }
  510.     public function getMagasinHoraires(): Collection
  511.     {
  512.         return $this->magasinHoraires;
  513.     }
  514.     public function addMagasinHoraire(MagasinHoraires $magasinHoraire): self
  515.     {
  516.         if (!$this->magasinHoraires->contains($magasinHoraire)) {
  517.             $this->magasinHoraires[] = $magasinHoraire;
  518.             $magasinHoraire->setMagasin($this);
  519.         }
  520.         return $this;
  521.     }
  522.     public function removeMagasinHoraire(MagasinHoraires $magasinHoraire): self
  523.     {
  524.         if ($this->magasinHoraires->removeElement($magasinHoraire)) {
  525.             // set the owning side to null (unless already changed)
  526.             if ($magasinHoraire->getMagasin() === $this) {
  527.                 $magasinHoraire->setMagasin(null);
  528.             }
  529.         }
  530.         return $this;
  531.     }
  532.     public function getMagasinHorairesExceptionnelles(): Collection
  533.     {
  534.         return $this->magasinHorairesExceptionnelles;
  535.     }
  536.     public function addMagasinHorairesExceptionnelle(MagasinHorairesExceptionnelles $magasinHorairesExceptionnelle): self
  537.     {
  538.         if (!$this->magasinHorairesExceptionnelles->contains($magasinHorairesExceptionnelle)) {
  539.             $this->magasinHorairesExceptionnelles[] = $magasinHorairesExceptionnelle;
  540.             $magasinHorairesExceptionnelle->setMagasin($this);
  541.         }
  542.         return $this;
  543.     }
  544.     public function removeMagasinHorairesExceptionnelle(MagasinHorairesExceptionnelles $magasinHorairesExceptionnelle): self
  545.     {
  546.         if ($this->magasinHorairesExceptionnelles->removeElement($magasinHorairesExceptionnelle)) {
  547.             // set the owning side to null (unless already changed)
  548.             if ($magasinHorairesExceptionnelle->getMagasin() === $this) {
  549.                 $magasinHorairesExceptionnelle->setMagasin(null);
  550.             }
  551.         }
  552.         return $this;
  553.     }
  554.     public
  555.     function getMagasinConvictions(): Collection
  556.     {
  557.         return $this->magasinConvictions;
  558.     }
  559.     public
  560.     function addMagasinConviction(MagasinConviction $magasinConviction): self
  561.     {
  562.         if (!$this->magasinConvictions->contains($magasinConviction)) {
  563.             $this->magasinConvictions[] = $magasinConviction;
  564.             $magasinConviction->setKAdherent($this);
  565.         }
  566.         return $this;
  567.     }
  568.     public
  569.     function removeMagasinConviction(MagasinConviction $magasinConviction): self
  570.     {
  571.         if ($this->magasinConvictions->removeElement($magasinConviction)) {
  572.             // set the owning side to null (unless already changed)
  573.             if ($magasinConviction->getKAdherent() === $this) {
  574.                 $magasinConviction->setKAdherent(null);
  575.             }
  576.         }
  577.         return $this;
  578.     }
  579.     public
  580.     function getServices(): Collection
  581.     {
  582.         return $this->services;
  583.     }
  584.     public
  585.     function addService(Service $service): self
  586.     {
  587.         if (!$this->services->contains($service)) {
  588.             $this->services[] = $service;
  589.         }
  590.         return $this;
  591.     }
  592.     public
  593.     function removeService(Service $service): self
  594.     {
  595.         $this->services->removeElement($service);
  596.         return $this;
  597.     }
  598.     public
  599.     function getSpecialites(): Collection
  600.     {
  601.         return $this->specialites;
  602.     }
  603.     public
  604.     function addSpecialite(Specialite $specialite): self
  605.     {
  606.         if (!$this->specialites->contains($specialite)) {
  607.             $this->specialites[] = $specialite;
  608.         }
  609.         return $this;
  610.     }
  611.     public
  612.     function removeSpecialite(Specialite $specialite): self
  613.     {
  614.         $this->specialites->removeElement($specialite);
  615.         return $this;
  616.     }
  617.     public function getComplements($type null): Collection|array
  618.     {
  619.         if (!is_null($type)) {
  620.             $datas = [];
  621.             foreach ($this->complements as $complement) {
  622.                 if ($complement->getType() == $type) {
  623.                     $datas[] = $complement;
  624.                 }
  625.             }
  626.             return $datas;
  627.         }
  628.         return $this->complements;
  629.     }
  630.     public
  631.     function addComplement(Complement $complement): self
  632.     {
  633.         if (!$this->complements->contains($complement)) {
  634.             $this->complements[] = $complement;
  635.         }
  636.         return $this;
  637.     }
  638.     public
  639.     function removeComplement(Complement $complement): self
  640.     {
  641.         $this->complements->removeElement($complement);
  642.         return $this;
  643.     }
  644.     public
  645.     function getOperateursRemboursement(): Collection
  646.     {
  647.         return $this->operateursRemboursement;
  648.     }
  649.     public
  650.     function addOperateursRemboursement(OperateursRemboursement $operateursRemboursement): self
  651.     {
  652.         if (!$this->operateursRemboursement->contains($operateursRemboursement)) {
  653.             $this->operateursRemboursement[] = $operateursRemboursement;
  654.         }
  655.         return $this;
  656.     }
  657.     public
  658.     function removeOperateursRemboursement(OperateursRemboursement $operateursRemboursement): self
  659.     {
  660.         $this->operateursRemboursement->removeElement($operateursRemboursement);
  661.         return $this;
  662.     }
  663.     public
  664.     function getWidgetAbstracts(): Collection
  665.     {
  666.         return $this->widgetAbstracts;
  667.     }
  668.     public
  669.     function addWidgetAbstract(WidgetAbstract $widgetAbstract): self
  670.     {
  671.         if (!$this->widgetAbstracts->contains($widgetAbstract)) {
  672.             $this->widgetAbstracts[] = $widgetAbstract;
  673.             $widgetAbstract->setMagasin($this);
  674.         }
  675.         return $this;
  676.     }
  677.     public
  678.     function removeWidgetAbstract(WidgetAbstract $widgetAbstract): self
  679.     {
  680.         if ($this->widgetAbstracts->removeElement($widgetAbstract)) {
  681.             // set the owning side to null (unless already changed)
  682.             if ($widgetAbstract->getMagasin() === $this) {
  683.                 $widgetAbstract->setMagasin(null);
  684.             }
  685.         }
  686.         return $this;
  687.     }
  688.     public
  689.     function getPageAbstracts(): Collection
  690.     {
  691.         return $this->pageAbstracts;
  692.     }
  693.     public
  694.     function addPageAbstract(PageAbstract $pageAbstract): self
  695.     {
  696.         if (!$this->pageAbstracts->contains($pageAbstract)) {
  697.             $this->pageAbstracts[] = $pageAbstract;
  698.             $pageAbstract->setMagasin($this);
  699.         }
  700.         return $this;
  701.     }
  702.     public
  703.     function removePageAbstract(PageAbstract $pageAbstract): self
  704.     {
  705.         if ($this->pageAbstracts->removeElement($pageAbstract)) {
  706.             // set the owning side to null (unless already changed)
  707.             if ($pageAbstract->getMagasin() === $this) {
  708.                 $pageAbstract->setMagasin(null);
  709.             }
  710.         }
  711.         return $this;
  712.     }
  713.     public
  714.     function getMagasinCollaborateurs(): Collection
  715.     {
  716.         return $this->magasinCollaborateurs;
  717.     }
  718.     public
  719.     function addMagasinCollaborateur(MagasinCollaborateurs $magasinCollaborateur): self
  720.     {
  721.         if (!$this->magasinCollaborateurs->contains($magasinCollaborateur)) {
  722.             $this->magasinCollaborateurs[] = $magasinCollaborateur;
  723.             $magasinCollaborateur->setMagasin($this);
  724.         }
  725.         return $this;
  726.     }
  727.     public
  728.     function removeMagasinCollaborateur(MagasinCollaborateurs $magasinCollaborateur): self
  729.     {
  730.         if ($this->magasinCollaborateurs->removeElement($magasinCollaborateur)) {
  731.             // set the owning side to null (unless already changed)
  732.             if ($magasinCollaborateur->getMagasin() === $this) {
  733.                 $magasinCollaborateur->setMagasin(null);
  734.             }
  735.         }
  736.         return $this;
  737.     }
  738.     public
  739.     function getMagasinEquipe()
  740.     {
  741.         return $this->magasinEquipe;
  742.     }
  743.     public
  744.     function setMagasinEquipe(mixed $magasinEquipe): void
  745.     {
  746.         $this->magasinEquipe $magasinEquipe;
  747.     }
  748.     public
  749.     function getMagasinMarques(): Collection
  750.     {
  751.         return $this->magasinMarques;
  752.     }
  753.     public
  754.     function addMagasinMarque(MagasinMarques $magasinMarque): self
  755.     {
  756.         if (!$this->magasinMarques->contains($magasinMarque)) {
  757.             $this->magasinMarques[] = $magasinMarque;
  758.             $magasinMarque->setMagasin($this);
  759.         }
  760.         return $this;
  761.     }
  762.     public
  763.     function removeMagasinMarque(MagasinMarques $magasinMarque): self
  764.     {
  765.         if ($this->magasinMarques->removeElement($magasinMarque)) {
  766.             // set the owning side to null (unless already changed)
  767.             if ($magasinMarque->getMagasin() === $this) {
  768.                 $magasinMarque->setMagasin(null);
  769.             }
  770.         }
  771.         return $this;
  772.     }
  773.     public
  774.     function getNavigations(): Collection
  775.     {
  776.         return $this->navigations;
  777.     }
  778.     public
  779.     function addNavigation(Navigation $navigation): self
  780.     {
  781.         if (!$this->navigations->contains($navigation)) {
  782.             $this->navigations[] = $navigation;
  783.             $navigation->setMagasin($this);
  784.         }
  785.         return $this;
  786.     }
  787.     public
  788.     function removeNavigation(Navigation $navigation): self
  789.     {
  790.         if ($this->navigations->removeElement($navigation)) {
  791.             // set the owning side to null (unless already changed)
  792.             if ($navigation->getMagasin() === $this) {
  793.                 $navigation->setMagasin(null);
  794.             }
  795.         }
  796.         return $this;
  797.     }
  798.     public function getMagasinUrl($type null)
  799.     {
  800.         if (!is_null($type)) {
  801.             foreach ($this->magasinUrl as $url) {
  802.                 if ($url->getType() == $type) {
  803.                     return $url;
  804.                 }
  805.             }
  806.             return null;
  807.         } else {
  808.             return $this->magasinUrl;
  809.         }
  810.     }
  811.     public function addMagasinUrl(MagasinUrl $magasinUrl): self
  812.     {
  813.         if (!$this->magasinUrl->contains($magasinUrl)) {
  814.             $this->magasinUrl[] = $magasinUrl;
  815.             $magasinUrl->setMagasin($this);
  816.         }
  817.         return $this;
  818.     }
  819.     public function removeMagasinUrl(MagasinUrl $magasinUrl): self
  820.     {
  821.         if ($this->magasinUrl->removeElement($magasinUrl)) {
  822.             // set the owning side to null (unless already changed)
  823.             if ($magasinUrl->getMagasin() === $this) {
  824.                 $magasinUrl->setMagasin(null);
  825.             }
  826.         }
  827.         return $this;
  828.     }
  829.     public function getMagasinJuridiques(): Collection
  830.     {
  831.         return $this->magasinJuridiques;
  832.     }
  833.     public
  834.     function addMagasinJuridique(MagasinJuridique $magasinJuridique): self
  835.     {
  836.         if (!$this->magasinJuridiques->contains($magasinJuridique)) {
  837.             $this->magasinJuridiques[] = $magasinJuridique;
  838.             $magasinJuridique->setMagasin($this);
  839.         }
  840.         return $this;
  841.     }
  842.     public
  843.     function removeMagasinJuridique(MagasinJuridique $magasinJuridique): self
  844.     {
  845.         if ($this->magasinJuridiques->removeElement($magasinJuridique)) {
  846.             // set the owning side to null (unless already changed)
  847.             if ($magasinJuridique->getMagasin() === $this) {
  848.                 $magasinJuridique->setMagasin(null);
  849.             }
  850.         }
  851.         return $this;
  852.     }
  853.     public
  854.     function getAdhMmStat()
  855.     {
  856.         return $this->adhMmStat;
  857.     }
  858.     public
  859.     function setAdhMmStat(mixed $adhMmStat): void
  860.     {
  861.         $this->adhMmStat $adhMmStat;
  862.     }
  863.     public
  864.     function getMagasinContacts(MagasinContactQualifier $qualifier null$principal false): Collection
  865.     {
  866.         if (!is_null($qualifier)) {
  867.             $data = new ArrayCollection();
  868.             foreach ($this->magasinContacts as $contact) {
  869.                 if ($contact->getQualifier() === $qualifier && $contact->isPrincipal() === $principal) {
  870.                     $data->add($contact);
  871.                 }
  872.             }
  873.             return $data;
  874.         }
  875.         return $this->magasinContacts;
  876.     }
  877.     public function hasMagasinContact(MagasinContact $contactMagasinContactQualifier $qualifier): bool
  878.     {
  879.         return array_reduce($this->magasinContacts->toArray(), fn($carry$magContact) => $carry || ($contact !== $magContact && $magContact->getQualifier() === $qualifier), false);
  880.     }
  881.     public function allowExistMagasinContact(MagasinContact $contact): bool
  882.     {
  883.         return array_reduce($this->magasinContacts->toArray(), fn($carry$magContact) => $carry || ($contact !== $magContact && $contact->getValue() === $magContact->getValue() && $magContact->getQualifier() === $contact->getQualifier()), false);
  884.     }
  885.     public function getSpecificMagContact(MagasinContactQualifier $qualifierbool|null $principal null$initialize false)
  886.     {
  887.         foreach ($this->magasinContacts as $contact) {
  888.             if ($contact->getQualifier() === $qualifier && (!is_bool($principal) || $contact->isPrincipal() === $principal)) {
  889.                 return $contact;
  890.             }
  891.         }
  892.         if ($initialize) {
  893.             $contact = new MagasinContact();
  894.             $contact->setQualifier($qualifier);
  895.             $contact->setMagasin($this);
  896.             $contact->setName($qualifier->getLabel());
  897.             if (is_bool($principal)) {
  898.                 $contact->setPrincipal($principal);
  899.             }
  900.             return $contact;
  901.         }
  902.         return null;
  903.     }
  904.     public
  905.     function addMagasinContact(MagasinContact $magasinContact): self
  906.     {
  907.         if (!$this->magasinContacts->contains($magasinContact)) {
  908.             $this->magasinContacts[] = $magasinContact;
  909.             $magasinContact->setMagasin($this);
  910.         }
  911.         return $this;
  912.     }
  913.     public
  914.     function removeMagasinContact(MagasinContact $magasinContact): self
  915.     {
  916.         if ($this->magasinContacts->removeElement($magasinContact)) {
  917.             // set the owning side to null (unless already changed)
  918.             if ($magasinContact->getMagasin() === $this) {
  919.                 $magasinContact->setMagasin(null);
  920.             }
  921.         }
  922.         return $this;
  923.     }
  924.     public
  925.     function setAdhCrm($adhCrm null)
  926.     {
  927.         $this->adhCrm $adhCrm;
  928.         return $this;
  929.     }
  930.     public
  931.     function getAdhCrm()
  932.     {
  933.         return $this->adhCrm;
  934.     }
  935.     public function getPackOpc()
  936.     {
  937.         return $this->packOpc;
  938.     }
  939.     public function setPackOpc($packOpc): void
  940.     {
  941.         $this->packOpc $packOpc;
  942.     }
  943.     public function getAnnonces(): Collection
  944.     {
  945.         return $this->annonces;
  946.     }
  947.     public function addAnnonce(Annonce $annonce): self
  948.     {
  949.         if (!$this->annonces->contains($annonce)) {
  950.             $this->annonces[] = $annonce;
  951.             $annonce->setAdherent($this);
  952.         }
  953.         return $this;
  954.     }
  955.     public function removeAnnonce(Annonce $annonce): self
  956.     {
  957.         if ($this->annonces->removeElement($annonce)) {
  958.             // set the owning side to null (unless already changed)
  959.             if ($annonce->getAdherent() === $this) {
  960.                 $annonce->setAdherent(null);
  961.             }
  962.         }
  963.         return $this;
  964.     }
  965.     public function getMagasinAlert($type)
  966.     {
  967.         $magasinAlert = [];
  968.         $datas $this->magasinAlerts->toArray();
  969.         foreach ($datas as $data) {
  970.             if ($data->getType() == $type)
  971.                 $magasinAlert[] = $data;
  972.         }
  973.         return current($magasinAlert);
  974.     }
  975.     public function addMagasinAlert(MagasinAlert $magasinAlert): self
  976.     {
  977.         if (!$this->magasinAlerts->contains($magasinAlert)) {
  978.             $this->magasinAlerts->add($magasinAlert);
  979.             $magasinAlert->setMagasin($this);
  980.         }
  981.         return $this;
  982.     }
  983.     public function getConsentements(): Collection
  984.     {
  985.         return $this->consentements;
  986.     }
  987.     public function addConsentement(MagasinConsentements $consentement): self
  988.     {
  989.         if (!$this->consentements->contains($consentement)) {
  990.             $this->consentements->add($consentement);
  991.             $consentement->setMagasin($this);
  992.         }
  993.         return $this;
  994.     }
  995.     public function removeMagasinAlert(MagasinAlert $magasinAlert): self
  996.     {
  997.         if ($this->magasinAlerts->removeElement($magasinAlert)) {
  998.             // set the owning side to null (unless already changed)
  999.             if ($magasinAlert->getMagasin() === $this) {
  1000.                 $magasinAlert->setMagasin(null);
  1001.             }
  1002.         }
  1003.         return $this;
  1004.     }
  1005.     public function getMagasinMarquesAlertes(): Collection
  1006.     {
  1007.         return $this->magasinMarquesAlertes;
  1008.     }
  1009.     public function addMagasinMarquesAlerte(MagasinMarquesAlertes $magasinMarquesAlerte): self
  1010.     {
  1011.         if (!$this->magasinMarquesAlertes->contains($magasinMarquesAlerte)) {
  1012.             $this->magasinMarquesAlertes->add($magasinMarquesAlerte);
  1013.             $magasinMarquesAlerte->setKAdherent($this);
  1014.         }
  1015.         return $this;
  1016.     }
  1017.     public function removeMagasinMarquesAlerte(MagasinMarquesAlertes $magasinMarquesAlerte): self
  1018.     {
  1019.         if ($this->magasinMarquesAlertes->removeElement($magasinMarquesAlerte)) {
  1020.             // set the owning side to null (unless already changed)
  1021.             if ($magasinMarquesAlerte->getKAdherent() === $this) {
  1022.                 $magasinMarquesAlerte->setKAdherent(null);
  1023.             }
  1024.         }
  1025.         return $this;
  1026.     }
  1027.     public function getFirstMagasinContacts()
  1028.     {
  1029.         if (!empty($this->magasinContacts->toArray())) {
  1030.             return $this->magasinContacts->toArray()[0];
  1031.         }
  1032.         return null;
  1033.     }
  1034.     public function getSpecificConsentement(string $type)
  1035.     {
  1036.         foreach ($this->consentements as $consentement) {
  1037.             if (strtolower($consentement->getType()) === strtolower($type)) {
  1038.                 return $consentement;
  1039.             }
  1040.         }
  1041.         return null;
  1042.     }
  1043.     public function removeConsentement(MagasinConsentements $consentement): self
  1044.     {
  1045.         if ($this->consentements->removeElement($consentement)) {
  1046.             // set the owning side to null (unless already changed)
  1047.             if ($consentement->getMagasin() === $this) {
  1048.                 $consentement->setMagasin(null);
  1049.             }
  1050.         }
  1051.         return $this;
  1052.     }
  1053.     public function getAvis35ans(): Collection
  1054.     {
  1055.         return $this->avis35ans;
  1056.     }
  1057.     public function addAvis35an(AvisEvenement $avis35an): static
  1058.     {
  1059.         if (!$this->avis35ans->contains($avis35an)) {
  1060.             $this->avis35ans->add($avis35an);
  1061.             $avis35an->setKAdh($this);
  1062.         }
  1063.         return $this;
  1064.     }
  1065.     public function removeAvis35an(AvisEvenement $avis35an): static
  1066.     {
  1067.         if ($this->avis35ans->removeElement($avis35an)) {
  1068.             // set the owning side to null (unless already changed)
  1069.             if ($avis35an->getKAdh() === $this) {
  1070.                 $avis35an->setKAdh(null);
  1071.             }
  1072.         }
  1073.         return $this;
  1074.     }
  1075.     public function getCentrale(): mixed
  1076.     {
  1077.         return $this->centrale;
  1078.     }
  1079.     public function setCentrale($centrale): void
  1080.     {
  1081.         $this->centrale $centrale;
  1082.     }
  1083.     public function getConvictionFr(): mixed
  1084.     {
  1085.         return $this->convictionFr;
  1086.     }
  1087.     public function setConvictionFr($convictionFr): void
  1088.     {
  1089.         $this->convictionFr $convictionFr;
  1090.     }
  1091.     public function getConvictionNl(): mixed
  1092.     {
  1093.         return $this->convictionNl;
  1094.     }
  1095.     public function setConvictionNl(mixed $convictionNl): void
  1096.     {
  1097.         $this->convictionNl $convictionNl;
  1098.     }
  1099.     public function setConsentement($magasinConsentements): self
  1100.     {
  1101.         foreach ($magasinConsentements as $magasinConsentement) {
  1102.             if (!$this->consentements->contains($magasinConsentement)) {
  1103.                 $this->consentements[] = $magasinConsentement;
  1104.                 $magasinConsentement->setMagasin($this);
  1105.             }
  1106.         }
  1107.         return $this;
  1108.     }
  1109.     public function addMagasinReseau(MagasinReseaux $magasinReseau): self
  1110.     {
  1111.         if (!$this->magasinReseaux->contains($magasinReseau)) {
  1112.             $this->magasinReseaux[] = $magasinReseau;
  1113.             $magasinReseau->setMagasin($this);
  1114.         }
  1115.         return $this;
  1116.     }
  1117.     public function removeMagasinReseau(MagasinReseaux $magasinReseau): self
  1118.     {
  1119.         if ($this->magasinReseaux->removeElement($magasinReseau)) {
  1120.             // set the owning side to null (unless already changed)
  1121.             if ($magasinReseau->getMagasin() === $this) {
  1122.                 $magasinReseau->setMagasin(null);
  1123.             }
  1124.         }
  1125.         return $this;
  1126.     }
  1127.     public function setMagasinReseaux($magasinReseaux): self
  1128.     {
  1129.         foreach ($magasinReseaux as $magasinReseau) {
  1130.             if (!$this->magasinReseaux->contains($magasinReseau)) {
  1131.                 $this->magasinReseaux[] = $magasinReseau;
  1132.                 $magasinReseau->setMagasin($this);
  1133.             }
  1134.         }
  1135.         return $this;
  1136.     }
  1137.     public function getMagasinReseaux(): Collection
  1138.     {
  1139.         return $this->magasinReseaux;
  1140.     }
  1141.     public function setConsentServSpecInfoComple($consentServSpecInfoComple): void
  1142.     {
  1143.         $this->consentServSpecInfoComple $consentServSpecInfoComple;
  1144.     }
  1145.     public function getConsentServSpecInfoComple(): mixed
  1146.     {
  1147.         return $this->consentServSpecInfoComple;
  1148.     }
  1149.     /**
  1150.      * @return Collection<int, SeoVilles>
  1151.      */
  1152.     public function getSeoVilles(): Collection
  1153.     {
  1154.         return $this->seoVilles;
  1155.     }
  1156.     public function addSeoVille(SeoVilles $seoVille): static
  1157.     {
  1158.         if (!$this->seoVilles->contains($seoVille)) {
  1159.             $this->seoVilles->add($seoVille);
  1160.             $seoVille->setMagasin($this);
  1161.         }
  1162.         return $this;
  1163.     }
  1164.     public function removeSeoVille(SeoVilles $seoVille): static
  1165.     {
  1166.         if ($this->seoVilles->removeElement($seoVille)) {
  1167.             // set the owning side to null (unless already changed)
  1168.             if ($seoVille->getMagasin() === $this) {
  1169.                 $seoVille->setMagasin(null);
  1170.             }
  1171.         }
  1172.         return $this;
  1173.     }
  1174.     public function getMagasinAlerts(): Collection
  1175.     {
  1176.         return $this->magasinAlerts;
  1177.     }
  1178.     public function setMagasinAlerts(Collection $magasinAlerts): void
  1179.     {
  1180.         $this->magasinAlerts $magasinAlerts;
  1181.     }
  1182.     public function isWantFacturationPapier(): bool
  1183.     {
  1184.         return $this->wantFacturationPapier;
  1185.     }
  1186.     public function setWantFacturationPapier(bool $wantFacturationPapier): void
  1187.     {
  1188.         $this->wantFacturationPapier $wantFacturationPapier;
  1189.     }
  1190.     public function isAvisGmbActive(): bool
  1191.     {
  1192.         return $this->avisGmbActive;
  1193.     }
  1194.     public function setAvisGmbActive(bool $avisGmbActive): void
  1195.     {
  1196.         $this->avisGmbActive $avisGmbActive;
  1197.     }
  1198.     public function isAffAvisCrmOpc(): bool
  1199.     {
  1200.         return $this->affAvisCrmOpc;
  1201.     }
  1202.     public function setAffAvisCrmOpc(bool $affAvisCrmOpc): void
  1203.     {
  1204.         $this->affAvisCrmOpc $affAvisCrmOpc;
  1205.     }
  1206.     public function getFaqs(): Collection
  1207.     {
  1208.         return $this->faqs;
  1209.     }
  1210.     public function setFaqs(Collection $faqs): void
  1211.     {
  1212.         $this->faqs $faqs;
  1213.     }
  1214.     /**
  1215.      * @return Collection
  1216.      */
  1217.     public function getVenteRechercheMagasinsAlertes(): Collection
  1218.     {
  1219.         return $this->venteRechercheMagasinsAlertes;
  1220.     }
  1221.     /**
  1222.      * @param Collection $venteRechercheMagasinsAlertes
  1223.      */
  1224.     public function setVenteRechercheMagasinsAlertes(Collection $venteRechercheMagasinsAlertes): void
  1225.     {
  1226.         $this->venteRechercheMagasinsAlertes $venteRechercheMagasinsAlertes;
  1227.     }
  1228.     
  1229.     public function initializeMagContact(MagasinContactQualifier $magasinContactQualifier): MagasinContact
  1230.     {
  1231.         $newContact = new MagasinContact();
  1232.         $newContact->setQualifier($magasinContactQualifier);
  1233.         $newContact->setMagasin($this);
  1234.         return $newContact;
  1235.     }
  1236.     // Vérifie si l'adhérent lié au moins 1 contact à un canal précis
  1237.     public function hasActiveContactCanal(string $canalIdentifier): bool
  1238.     {
  1239.         foreach ($this->magasinContacts as $magasinContact) {
  1240.             foreach ($magasinContact->getCanaux() as $canal) {
  1241.                 if ($canal->getIdentifier() === $canalIdentifier) {
  1242.                     return true;
  1243.                 }
  1244.             }
  1245.         }
  1246.         return false;
  1247.     }
  1248.     public function getSocialsMediaUrls()
  1249.     {
  1250.         $data = [];
  1251.         foreach ($this->magasinUrl as $magUrl) {
  1252.             if (in_array($magUrl->getType(), ['facebook''instagram''linkedin''snapchat''tiktok''twitter''whatsapp''youtube'])) {
  1253.                 $data[$magUrl->getType()] = $magUrl;
  1254.             }
  1255.         }
  1256.         return $data;
  1257.     }
  1258.     /**
  1259.      * @return Collection<int, ImagePartner>
  1260.      */
  1261.     public function getImagePartners(): Collection
  1262.     {
  1263.         return $this->imagePartners;
  1264.     }
  1265.     public function addImagePartner(ImagePartner $imagePartner): static
  1266.     {
  1267.         if (!$this->imagePartners->contains($imagePartner)) {
  1268.             $this->imagePartners->add($imagePartner);
  1269.             $imagePartner->setMagasin($this);
  1270.         }
  1271.         return $this;
  1272.     }
  1273.     public function removeImagePartner(ImagePartner $imagePartner): static
  1274.     {
  1275.         if ($this->imagePartners->removeElement($imagePartner)) {
  1276.             // set the owning side to null (unless already changed)
  1277.             if ($imagePartner->getMagasin() === $this) {
  1278.                 $imagePartner->setMagasin(null);
  1279.             }
  1280.         }
  1281.         return $this;
  1282.     }
  1283.     /**
  1284.      * @return Collection<int, KpiParameters>
  1285.      */
  1286.     public function getExercices(): Collection
  1287.     {
  1288.         return $this->exercices;
  1289.     }
  1290.     public function addExercice(KpiParameters $exercice): self
  1291.     {
  1292.         if (!$this->exercices->contains($exercice)) {
  1293.             $this->exercices->add($exercice);
  1294.             $exercice->setMagasin($this);
  1295.         }
  1296.         return $this;
  1297.     }
  1298.     public function removeExercice(KpiParameters $exercice): self
  1299.     {
  1300.         if ($this->exercices->removeElement($exercice)) {
  1301.             if ($exercice->getMagasin() === $this) {
  1302.                 $exercice->setMagasin(null);
  1303.             }
  1304.         }
  1305.         return $this;
  1306.     }
  1307.     /**
  1308.      * @return Collection<int, KpiObjectifs>
  1309.      */
  1310.     public function getKpiObjectifs(): Collection
  1311.     {
  1312.         return $this->kpiObjectifs;
  1313.     }
  1314.     public function getExerciceEnCours(): ?KpiParameters
  1315.     {
  1316.         foreach ($this->exercices as $param) {
  1317.             if ($param->getStatus() === 'EN_COURS') {
  1318.                 return $param;
  1319.             }
  1320.         }
  1321.         return null;
  1322.     }
  1323.     public function getExercicePrecedent(): ?KpiParameters
  1324.     {
  1325.         foreach ($this->exercices as $param) {
  1326.             if ($param->getStatus() === 'TERMINE') {
  1327.                 return $param;
  1328.             }
  1329.         }
  1330.         return null;
  1331.     }
  1332.     public function getObjectifsExerciceEnCours(): ?KpiObjectifs
  1333.     {
  1334.         foreach ($this->exercices as $param) {
  1335.             if ($param->getStatus() === 'EN_COURS') {
  1336.                 return $param->getObjectifs();
  1337.             }
  1338.         }
  1339.         return null;
  1340.     }
  1341.     public function getObjectifsExercicePrecedent(): ?KpiObjectifs
  1342.     {
  1343.         foreach ($this->exercices as $param) {
  1344.             if ($param->getStatus() === 'TERMINE') {
  1345.                 return $param->getObjectifs();
  1346.             }
  1347.         }
  1348.         return null;
  1349.     }
  1350.     public function getCrmSettings(): ?CrmSettings
  1351.     {
  1352.         return $this->crmSettings;
  1353.     }
  1354.     public function setCrmSettings(?CrmSettings $crmSettings): static
  1355.     {
  1356.         // unset the owning side of the relation if necessary
  1357.         if ($crmSettings === null && $this->crmSettings !== null) {
  1358.             $this->crmSettings->setMagasin(null);
  1359.         }
  1360.         // set the owning side of the relation if necessary
  1361.         if ($crmSettings !== null && $crmSettings->getMagasin() !== $this) {
  1362.             $crmSettings->setMagasin($this);
  1363.         }
  1364.         $this->crmSettings $crmSettings;
  1365.         return $this;
  1366.     }
  1367.     /**
  1368.      * @return Collection<int, CrmResponseIa>
  1369.      */
  1370.     public function getCrmResponseIas(): Collection
  1371.     {
  1372.         return $this->crmResponseIas;
  1373.     }
  1374.     public function addCrmResponseIa(CrmResponseIa $crmResponseIa): static
  1375.     {
  1376.         if (!$this->crmResponseIas->contains($crmResponseIa)) {
  1377.             $this->crmResponseIas->add($crmResponseIa);
  1378.             $crmResponseIa->setMagasin($this);
  1379.         }
  1380.         return $this;
  1381.     }
  1382.     public function removeCrmResponseIa(CrmResponseIa $crmResponseIa): static
  1383.     {
  1384.         if ($this->crmResponseIas->removeElement($crmResponseIa)) {
  1385.             // set the owning side to null (unless already changed)
  1386.             if ($crmResponseIa->getMagasin() === $this) {
  1387.                 $crmResponseIa->setMagasin(null);
  1388.             }
  1389.         }
  1390.         return $this;
  1391.     }
  1392. }