<?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\StructureRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* Structure.
*
* @ORM\Table(name="Structure", indexes={@ORM\Index(name="structure_tokens", columns={"token"})})
*
* @ORM\Entity(repositoryClass=StructureRepository::class)
*
* @Vich\Uploadable
*
* @ORM\HasLifecycleCallbacks
*/
class Structure
{
/**
* @var int
*/
public $typeStructureId;
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="nom", type="string", length=255)
*/
private $nom;
/**
* @var string
*
* @ORM\Column(name="adresse", type="string", length=255, nullable=true)
*/
private $adresse;
/**
* @var string
*
* @ORM\Column(name="code_postal", type="string", length=255, nullable=true)
*/
private $code_postal;
/**
* @var string
*
* @ORM\Column(name="telephone", type="string", length=15, nullable=true)
*/
private $telephone;
/**
* @var string
*
* @ORM\Column(name="fax", type="string", length=15, nullable=true)
*/
private $fax;
/**
* @var string
*
* @ORM\Column(name="site_internet", type="string", length=255, nullable=true)
*/
private $siteInternet;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255, nullable=true)
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="code_ape", type="string", length=255, nullable=true)
*/
private $codeApe;
/**
* @var string
*
* @ORM\Column(name="siret", type="string", length=255, nullable=true)
*/
private $siret;
/**
* @var string
*
* @ORM\Column(name="directorName", type="string", length=255, nullable=true)
*/
private $directorName;
/**
* @var string
*
* @ORM\Column(name="presidentName", type="string", length=255, nullable=true)
*/
private $presidentName;
/**
* @var string
*
* @ORM\Column(name="login", type="string", length=255,nullable=true)
*/
private $login;
/**
* @var string
*
* @ORM\Column(name="password", type="string", length=255,nullable=true)
*/
private $password;
/**
* @var bool
*
* @ORM\Column(name="is_actif", type="boolean",nullable=true)
*/
private $isActif;
/**
* @var bool
*
* @ORM\Column(name="is_delete", type="boolean", options={"default" = 0})
*/
private $isDelete = false;
/**
* @ORM\ManyToOne(targetEntity="TypeStructure", inversedBy="structures")
*
* @ORM\JoinColumn(name="type_structure_id", referencedColumnName="id")
*/
private $typeStructure;
/**
* @ORM\ManyToOne(targetEntity="Commune", inversedBy="structuresImplementes")
*
* @ORM\JoinColumn(name="commune_implementation_id", referencedColumnName="id")
*/
private $communeImplementation;
/**
* @ORM\ManyToMany(targetEntity="Commune", inversedBy="structuresZoneInfluence")
*
* @ORM\JoinTable(name="structure_commune_zone_influence")
*/
private $communesZoneInfluence;
/**
* @ORM\ManyToOne(targetEntity="Departement", inversedBy="structures")
*
* @ORM\JoinColumn(name="departement_id", referencedColumnName="id")
*/
private $departement;
/**
* @ORM\ManyToOne(targetEntity="Region", inversedBy="structures")
*
* @ORM\JoinColumn(name="region_id", referencedColumnName="id")
*/
private $region;
/**
* @ORM\ManyToOne(targetEntity="GrandeRegion", inversedBy="structures")
*
* @ORM\JoinColumn(name="grandeRegion_id", referencedColumnName="id")
*/
private $grandeRegion;
/**
* @ORM\OneToMany(targetEntity="Question", mappedBy="structure")
*/
private $questions;
/**
* @ORM\OneToMany(targetEntity="Action", mappedBy="structure")
*/
private $actions;
/**
* @var int
*
* @ORM\Column(name="dureeAgrement", type="integer", nullable=true)
*/
private $dureeAgrement;
/**
* Quel est le mode de gestion du centre social ?
*
* @ORM\ManyToOne(targetEntity="ModeGestion", inversedBy="structures")
*
* @ORM\JoinColumn(name="mode_gestion_id", referencedColumnName="id")
*/
private $modeGestion;
/**
* Quelle convention collective nationale appliquez-vous ?
*
* @ORM\ManyToOne(targetEntity="ConventionCollective", inversedBy="structures")
*
* @ORM\JoinColumn(name="convention_collective_id", referencedColumnName="id", nullable=true)
*/
private ?ConventionCollective $conventionCollective = null;
/**
* @var string
*
* @ORM\Column(name="autre_mode_gestion", type="string", length=255, nullable=true)
*/
private $autreModeGestion;
/**
* @var bool
*
* @ORM\Column(name="haveSystemeAdhesion", type="boolean", options={"default" = 1})
*/
private $haveSystemeAdhesion = true;
/**
* @var int
*
* @ORM\Column(name="adhesionIndividuel", type="integer", nullable=true, options={"default" = 0})
*/
private $adhesionIndividuel = 0;
/**
* @var int
*
* @ORM\Column(name="adhesionFamiliale", type="integer", nullable=true, options={"default" = 0})
*/
private $adhesionFamiliale = 0;
/**
* @var int
*
* @ORM\Column(name="nbPersonneAdhesion", type="integer", nullable=true, options={"default" = 0})
*/
private $nbPersonneAdhesion = 0;
/**
* @var int
*
* @ORM\Column(name="nbParticipantActivite", type="integer", nullable=true)
*/
private $nbParticipantActivite;
/**
* @var int
*
* @ORM\Column(name="nbParticipantAction", type="integer", nullable=true)
*/
private $nbParticipantAction;
/**
* @var int
*
* @ORM\Column(name="nbParticipantPonctuel", type="integer", nullable=true)
*/
private $nbParticipantPonctuel;
/**
* Cette association gère-t-elle: Un agrément / Plusieurs agrément.
*
* @ORM\ManyToOne(targetEntity="Agrement", inversedBy="structures")
*
* @ORM\JoinColumn(name="agrement_id", referencedColumnName="id")
*/
private $agrement;
/**
* Liste des durées des agréments.
*
* @ORM\ManyToOne(targetEntity="AgrementDuree", inversedBy="structures")
*
* @ORM\JoinColumn(name="agrement_duree_id", referencedColumnName="id")
*/
private $agrementDuree;
/**
* @var text
*
* @ORM\Column(name="activityDomain", type="text", nullable=true)
*/
private $activityDomain;
/**
* si mode de gestion « collectivité locale », précisez :
*
* @ORM\ManyToOne(targetEntity="ModeGestionCollectiviteLocale", inversedBy="structures")
*
* @ORM\JoinColumn(name="mode_gestion_collectivite_locale_id", referencedColumnName="id")
*/
private $modeGestionCollectiviteLocale;
/**
* si mode de gestion « co gestion », précisez :
*
* @ORM\ManyToOne(targetEntity="ModeGestionCoGestion", inversedBy="structures")
*
* @ORM\JoinColumn(name="mode_gestion_co_gestion_id", referencedColumnName="id")
*/
private $modeGestionCoGestion;
/**
* Êtes vous adhérent à la Fédération des centres sociaux ?
*
* @var bool
*
* @ORM\Column(name="is_adherent_federation", type="boolean",nullable=true, options={"default" : 0})
*/
private $isAdherentFederation = false;
/**
* Êtes vous adhérent à une autre fédération ?
*
* @ORM\ManyToOne(targetEntity="AdherentAutreFederation", inversedBy="structures")
*
* @ORM\JoinColumn(name="adherent_autre_federation_id", referencedColumnName="id")
*/
private $adherentAutreFederation;
/**
* Êtes vous adhérent à une autre fédération ?
*
* @ORM\ManyToMany(targetEntity="AdherentAutreFederation", inversedBy="structures2", cascade={"persist"})
*
* @ORM\JoinTable(name="structures_adherentAutreFederation")
*/
private $adherentAutreFederation2;
/**
* But(s) de ces modalités d'adhésion ?
*
* @ORM\ManyToMany(targetEntity="SystemeAdhesionGoal", inversedBy="structures", cascade={"persist"})
*
* @ORM\JoinTable(name="structures_systemeAdhesionGoal")
*/
private $systemeAdhesionGoal;
/**
* @var string
*
* @ORM\Column(name="precision_adherent_autre_federation", type="string", length=255, nullable=true)
*/
private $precisionAdherentAutreFederation;
/**
* Votre territoire d'intervention est.
*
* @ORM\ManyToOne(targetEntity="TerritoireIntervention", inversedBy="structures")
*
* @ORM\JoinColumn(name="territoire_intervention_id", referencedColumnName="id", onDelete="SET NULL" )
*/
private $territoireIntervention;
/**
* @var bool
*
* @ORM\Column(name="is_gens_voyage", type="boolean",nullable=true)
*/
private $isGensVoyage;
/**
* @var bool
*
* @ORM\Column(name="is_multiSite", type="boolean",nullable=true)
*/
private $isMultiSites;
/**
* @var bool
*
* @ORM\Column(name="is_itinerante", type="boolean",nullable=true)
*/
private $isItinerante;
/**
* Si votre territoire d'intervention est un espace à dominante urbaine, il est situé sur:
*
* @ORM\ManyToOne(targetEntity="TerritoireInterventionUrbaine", inversedBy="structures")
*
* @ORM\JoinColumn(name="territoire_intervention_urbaine_id", referencedColumnName="id")
*/
private $territoireInterventionUrbaine;
/**
* Si votre territoire d'intervention est un espace à dominante rurale, il est situé sur:
*
* @ORM\ManyToOne(targetEntity="TerritoireInterventionRurale", inversedBy="structures")
*
* @ORM\JoinColumn(name="territoire_intervention_rurale_id", referencedColumnName="id")
*/
private $territoireInterventionRurale;
/**
* votre territoire est-il un territoire de revitalisation rurale.
*
* @var bool
*
* @ORM\Column(name="is_territoire_revitalisation_rurale", type="boolean",nullable=true)
*/
private $isTerritoireRevitalisationRurale;
/**
* @var string
*
* @ORM\Column(name="territoire_revitalisation_rurale", type="string", length=255,nullable=true)
*/
private $territoireRevitalisationRurale;
/**
* La politique de la ville et votre centre social (centre social situé sur un territoire urbain).
*
* @ORM\ManyToMany(targetEntity="PolitiqueVille", cascade={"persist"})
*
* @ORM\JoinTable(name="structures_politique_villes")
*/
private $politiqueVille;
/**
* @var string
*
* @ORM\Column(name="qpvNumbers", type="string", length=255,nullable=true)
*/
private $qpvNumbers;
/**
* @var string
*
* @ORM\Column(name="zrrCities", type="string", length=255,nullable=true)
*/
private $zrrCities;
/**
* Date du 1er argrément.
*
* @var date
*
* @ORM\Column(name="date_1er_agrement", type="date",nullable=true)
*/
private $date_1er_agrement;
/**
* Population zone de compétence.
*
* @var int
*
* @ORM\Column(name="populationZoneCompetence", type="integer", nullable=true)
*/
private $population_zone_competence;
/**
* @var text
*
* @ORM\Column(name="historique", type="text", nullable=true)
*/
private $historique;
/**
* @ORM\OneToOne(targetEntity="User", inversedBy="structure",cascade={"remove"})
*
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
* */
private $user;
/**
* Nb commune territoire urbain.
*
* @var int
*
* @ORM\Column(name="nbCommuneUrbain", type="integer", nullable=true)
*/
private $nbCommuneUrbain;
/**
* Nb commune territoire rural.
*
* @var int
*
* @ORM\Column(name="nbCommuneRural", type="integer", nullable=true)
*/
private $nbCommuneRural;
/**
* @ORM\OneToMany(targetEntity="FicheAction", mappedBy="structure")
*/
private $fichesAction;
/**
* @var text
*
* @ORM\Column(name="observation", type="text", nullable=true)
*/
private $observation;
/**
* @var string
*
* @ORM\Column(name="axe_projet_1", type="string", length=255, nullable=true)
*/
private $axeProjet1;
/**
* @var string
*
* @ORM\Column(name="axe_projet_2", type="string", length=255, nullable=true)
*/
private $axeProjet2;
/**
* @var string
*
* @ORM\Column(name="axe_projet_3", type="string", length=255, nullable=true)
*/
private $axeProjet3;
/**
* @var string
*
* @ORM\Column(name="axe_projet_4", type="string", length=255, nullable=true)
*/
private $axeProjet4;
/**
* @var string
*
* @ORM\Column(name="axe_projet_5", type="string", length=255, nullable=true)
*/
private $axeProjet5;
/**
* @ORM\Column(type="string", length=36, nullable=true)
*/
private $token;
/**
* @ORM\OneToOne(targetEntity="FicheSynthetique", mappedBy="structure")
*/
private $ficheSynthetique;
/**
* @Vich\UploadableField(mapping="structure_logo", fileNameProperty="logo")
*/
private ?File $logoFile = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @var string
*/
private $logo;
/**
* @ORM\Column(name="createdAt", type="datetime", nullable=true)
*/
private ?\DateTime $createdAt = null;
/**
* @ORM\Column(name="updatedAt", type="datetime", nullable=true)
*
* @Gedmo\Timestampable(on="update")
*/
private \DateTime $updatedAt;
/**
* @var float
*
* @ORM\Column(name="latitude", type="decimal", precision=10, scale=8, nullable=true)
*/
private $latitude;
/**
* @var float
*
* @ORM\Column(name="longitude", type="decimal", precision=10, scale=8, nullable=true)
*/
private $longitude;
/**
* @var bool
*
* @ORM\Column(name="canShowCSO", type="boolean", options={"default" = 1})
*/
private $canShowCSO = true;
/**
* @var bool
*
* @ORM\Column(name="canShowEVS", type="boolean", options={"default" = 1})
*/
private $canShowEVS = true;
/**
* @var bool
*
* @ORM\Column(name="hasEVSAgrement", type="boolean", options={"default" = 0}, nullable=true)
*/
private $hasEVSAgrement = false;
/**
* @var bool
*
* @ORM\Column(name="hasactionToHelpPersonRightsAccess", type="boolean", options={"default" = 0}, nullable=true)
*/
private $hasactionToHelpPersonRightsAccess = false;
/**
* @ORM\Column(name="actionsToHelpPersonRightsAccess", type="array")
*
* @var array
*/
private $actionsToHelpPersonRightsAccess = [];
/**
* @var text
*
* @ORM\Column(name="actionsToHelpPersonRightsAccessOther", type="text", nullable=true)
*/
private $actionsToHelpPersonRightsAccessOther;
/**
* @ORM\ManyToMany(targetEntity="QPV", cascade={"persist"})
*/
private $qpvs;
/**
* @var int
*
* @ORM\Column(name="nbAssociationAdhereProjetStructure", type="integer", nullable=true, options={"default" = 0})
*/
private $nbAssociationAdhereProjetStructure = 0;
/**
* Constructor.
*/
public function __construct()
{
$this->communesZoneInfluence = new ArrayCollection();
$this->createdAt = new \DateTime('now');
$this->updatedAt = new \DateTime('now');
}
#[\Override]
public function __toString(): string
{
return $this->nom.' - '.$this->departement;
}
public function getGeolocCoordinate(): string
{
$geoloc = null;
if ($this->latitude && $this->longitude) {
$geoloc = $this->latitude.','.$this->longitude;
} elseif ($this->getCommuneImplementation()) {
$geoloc = $this->getCommuneImplementation()->getLongitude().','.$this->getCommuneImplementation()->getLatitude();
}
return $geoloc;
}
public function getInsee()
{
$insee = null;
if ($this->getCommuneImplementation()) {
$insee = $this->getCommuneImplementation()->getInsee();
}
return $insee;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set nom.
*
* @param string $nom
*/
public function setNom($nom): static
{
$this->nom = $nom;
return $this;
}
/**
* Get nom.
*
* @return string
*/
public function getNom()
{
return $this->nom;
}
/**
* Set adresse.
*
* @param string $adresse
*/
public function setAdresse($adresse): static
{
$this->adresse = $adresse;
return $this;
}
/**
* Get adresse.
*
* @return string
*/
public function getAdresse()
{
return $this->adresse;
}
/**
* Set telephone.
*
* @param string $telephone
*/
public function setTelephone($telephone): static
{
$this->telephone = $telephone;
return $this;
}
/**
* Get telephone.
*
* @return string
*/
public function getTelephone()
{
return $this->telephone;
}
/**
* Set siteInternet.
*
* @param string $siteInternet
*/
public function setSiteInternet($siteInternet): static
{
$this->siteInternet = $siteInternet;
return $this;
}
/**
* Get siteInternet.
*
* @return string
*/
public function getSiteInternet()
{
return $this->siteInternet;
}
/**
* Set email.
*
* @param string $email
*/
public function setEmail($email): static
{
$this->email = $email;
return $this;
}
/**
* Get email.
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set login.
*
* @param string $login
*/
public function setLogin($login): static
{
$this->login = $login;
return $this;
}
/**
* Get login.
*
* @return string
*/
public function getLogin()
{
return $this->login;
}
/**
* Set password.
*
* @param string $password
*/
public function setPassword($password): static
{
$this->password = $password;
return $this;
}
/**
* Get password.
*
* @return string
*/
public function getPassword()
{
return $this->password;
}
/**
* Set isActif.
*
* @param bool $isActif
*/
public function setIsActif($isActif): static
{
$this->isActif = $isActif;
return $this;
}
/**
* Get isActif.
*
* @return bool
*/
public function getIsActif()
{
return $this->isActif;
}
/**
* Set typeStructure.
*/
public function setTypeStructure(?TypeStructure $typeStructure = null): static
{
$this->typeStructure = $typeStructure;
return $this;
}
/**
* Get typeStructure.
*
* @return TypeStructure
*/
public function getTypeStructure()
{
return $this->typeStructure;
}
/**
* Set typeStructureId.
*
* @param int $typeStructureId
*/
public function setTypeStructureId($typeStructureId): static
{
$this->typeStructureId = $typeStructureId;
return $this;
}
/**
* Set communeImplementation.
*/
public function setCommuneImplementation(?Commune $communeImplementation = null): static
{
$this->communeImplementation = $communeImplementation;
return $this;
}
/**
* Get communeImplementation.
*
* @return Commune
*/
public function getCommuneImplementation()
{
return $this->communeImplementation;
}
/**
* Add communesZoneInfluence.
*/
public function addCommunesZoneInfluence(Commune $communesZoneInfluence): static
{
$this->communesZoneInfluence[] = $communesZoneInfluence;
return $this;
}
/**
* Remove communesZoneInfluence.
*/
public function removeCommunesZoneInfluence(Commune $communesZoneInfluence): void
{
$this->communesZoneInfluence->removeElement($communesZoneInfluence);
}
/**
* Get communesZoneInfluence.
*
* @return Collection
*/
public function getCommunesZoneInfluence()
{
return $this->communesZoneInfluence;
}
/**
* Set code_postal.
*
* @param string $codePostal
*/
public function setCodePostal($codePostal): static
{
$this->code_postal = $codePostal;
return $this;
}
/**
* Get code_postal.
*
* @return string
*/
public function getCodePostal()
{
return $this->code_postal;
}
/**
* Add questions.
*/
public function addQuestion(Question $questions): static
{
$this->questions[] = $questions;
return $this;
}
/**
* Remove questions.
*/
public function removeQuestion(Question $questions): void
{
$this->questions->removeElement($questions);
}
/**
* Get questions.
*
* @return Collection
*/
public function getQuestions()
{
return $this->questions;
}
/**
* Set modeGestion.
*/
public function setModeGestion(?ModeGestion $modeGestion = null): static
{
$this->modeGestion = $modeGestion;
return $this;
}
/**
* Get modeGestion.
*
* @return ModeGestion
*/
public function getModeGestion()
{
return $this->modeGestion;
}
/**
* Set conventionCollective.
*/
public function setConventionCollective(?ConventionCollective $conventionCollective = null): static
{
$this->conventionCollective = $conventionCollective;
return $this;
}
/**
* Get conventionCollective.
*/
public function getConventionCollective(): ?ConventionCollective
{
return $this->conventionCollective;
}
/**
* Set isAdherentFederation.
*
* @param bool $isAdherentFederation
*/
public function setIsAdherentFederation($isAdherentFederation): static
{
$this->isAdherentFederation = $isAdherentFederation;
return $this;
}
/**
* Get isAdherentFederationExport.
*/
public function getIsAdherentFederationExport(): string
{
if ($this->isAdherentFederation) {
return 'Oui';
} else {
return 'Non';
}
}
/**
* Get isAdherentFederation.
*
* @return bool
*/
public function getIsAdherentFederation()
{
return $this->isAdherentFederation;
}
/**
* Set isTerritoireRevitalisationRurale.
*
* @param bool $isTerritoireRevitalisationRurale
*/
public function setIsTerritoireRevitalisationRurale($isTerritoireRevitalisationRurale): static
{
$this->isTerritoireRevitalisationRurale = $isTerritoireRevitalisationRurale;
return $this;
}
/**
* Get isTerritoireRevitalisationRuraleExport.
*/
public function getIsTerritoireRevitalisationRuraleExport(): string
{
if ($this->isTerritoireRevitalisationRurale) {
return 'Oui';
} else {
return 'Non';
}
}
/**
* Get isTerritoireRevitalisationRurale.
*
* @return bool
*/
public function getIsTerritoireRevitalisationRurale()
{
return $this->isTerritoireRevitalisationRurale;
}
/**
* Set territoireRevitalisationRurale.
*
* @param string $territoireRevitalisationRurale
*/
public function setTerritoireRevitalisationRurale($territoireRevitalisationRurale): static
{
$this->territoireRevitalisationRurale = $territoireRevitalisationRurale;
return $this;
}
/**
* Get territoireRevitalisationRurale.
*
* @return string
*/
public function getTerritoireRevitalisationRurale()
{
return $this->territoireRevitalisationRurale;
}
/**
* Set adherentAutreFederation.
*/
public function setAdherentAutreFederation(?AdherentAutreFederation $adherentAutreFederation = null): static
{
$this->adherentAutreFederation = $adherentAutreFederation;
return $this;
}
/**
* Get adherentAutreFederation.
*
* @return AdherentAutreFederation
*/
public function getAdherentAutreFederation()
{
return $this->adherentAutreFederation;
}
/**
* Set territoireIntervention.
*/
public function setTerritoireIntervention(?TerritoireIntervention $territoireIntervention = null): static
{
$this->territoireIntervention = $territoireIntervention;
return $this;
}
/**
* Get territoireIntervention.
*
* @return TerritoireIntervention
*/
public function getTerritoireIntervention()
{
return $this->territoireIntervention;
}
/**
* Set territoireInterventionUrbaine.
*/
public function setTerritoireInterventionUrbaine(?TerritoireInterventionUrbaine $territoireInterventionUrbaine = null): static
{
$this->territoireInterventionUrbaine = $territoireInterventionUrbaine;
return $this;
}
/**
* Get territoireInterventionUrbaine.
*
* @return TerritoireInterventionUrbaine
*/
public function getTerritoireInterventionUrbaine()
{
return $this->territoireInterventionUrbaine;
}
/**
* Set territoireInterventionRurale.
*/
public function setTerritoireInterventionRurale(?TerritoireInterventionRurale $territoireInterventionRurale = null): static
{
$this->territoireInterventionRurale = $territoireInterventionRurale;
return $this;
}
/**
* Get territoireInterventionRurale.
*
* @return TerritoireInterventionRurale
*/
public function getTerritoireInterventionRurale()
{
return $this->territoireInterventionRurale;
}
/**
* Set user.
*/
public function setUser(?User $user = null): static
{
$this->user = $user;
return $this;
}
/**
* Get user.
*
* @return \User
*/
public function getUser()
{
return $this->user;
}
/*
* Renvoie la liste des types de strcuture que l'utilisateur a le droit de voir
*
* */
public function getListType(): array
{
$result = [];
switch ($this->getTypeStructure()->getNom()) {
case 'CSO':
break;
case 'CAF':
case 'FDD':
$result = ['EVS', 'CSO'];
break;
case 'RR':
$result = ['EVS', 'CSO', 'CAF', 'FDD'];
break;
case 'RGR':
$result = ['EVS', 'CSO', 'CAF', 'FDD', 'RR'];
break;
case 'RN':
$result = ['EVS', 'CSO', 'CAF', 'FDD', 'RR', 'RGR'];
break;
}
return $result;
}
/**
* @return \Departement
*/
public function getDepartement()
{
return $this->departement;
}
/**
* Set departement.
*/
public function setDepartement(?Departement $departement = null): static
{
$this->departement = $departement;
return $this;
}
/**
* Set region.
*/
public function setRegion(?Region $region = null): static
{
$this->region = $region;
return $this;
}
/**
* Get region.
*
* @return Region
*/
public function getRegion()
{
return $this->region;
}
/**
* Set autreModeGestion.
*
* @param string $autreModeGestion
*/
public function setAutreModeGestion($autreModeGestion): static
{
$this->autreModeGestion = $autreModeGestion;
return $this;
}
/**
* Get autreModeGestion.
*
* @return string
*/
public function getAutreModeGestion()
{
return $this->autreModeGestion;
}
/**
* Set precisionAdherentAutreFederation.
*
* @param string $precisionAdherentAutreFederation
*/
public function setPrecisionAdherentAutreFederation($precisionAdherentAutreFederation): static
{
$this->precisionAdherentAutreFederation = $precisionAdherentAutreFederation;
return $this;
}
/**
* Get precisionAdherentAutreFederation.
*
* @return string
*/
public function getPrecisionAdherentAutreFederation()
{
return $this->precisionAdherentAutreFederation;
}
/**
* Set adhesionIndividuel.
*
* @param int $adhesionIndividuel
*/
public function setAdhesionIndividuel($adhesionIndividuel): static
{
$this->adhesionIndividuel = $adhesionIndividuel;
return $this;
}
/**
* Get adhesionIndividuel.
*
* @return int
*/
public function getAdhesionIndividuel()
{
return $this->adhesionIndividuel;
}
/**
* Set adhesionFamiliale.
*
* @param int $adhesionFamiliale
*/
public function setAdhesionFamiliale($adhesionFamiliale): static
{
$this->adhesionFamiliale = $adhesionFamiliale;
return $this;
}
/**
* Get adhesionFamiliale.
*
* @return int
*/
public function getAdhesionFamiliale()
{
return $this->adhesionFamiliale;
}
/**
* Set modeGestionCollectiviteLocale.
*/
public function setModeGestionCollectiviteLocale(?ModeGestionCollectiviteLocale $modeGestionCollectiviteLocale = null): static
{
$this->modeGestionCollectiviteLocale = $modeGestionCollectiviteLocale;
return $this;
}
/**
* Get modeGestionCollectiviteLocale.
*
* @return ModeGestionCollectiviteLocale
*/
public function getModeGestionCollectiviteLocale()
{
return $this->modeGestionCollectiviteLocale;
}
/**
* Set codeApe.
*
* @param string $codeApe
*/
public function setCodeApe($codeApe): static
{
$this->codeApe = $codeApe;
return $this;
}
/**
* Get codeApe.
*
* @return string
*/
public function getCodeApe()
{
return $this->codeApe;
}
/**
* Set siret.
*
* @param string $siret
*/
public function setSiret($siret): static
{
$this->siret = $siret;
return $this;
}
/**
* Get siret.
*
* @return string
*/
public function getSiret()
{
return $this->siret;
}
/**
* Set fax.
*
* @param string $fax
*/
public function setFax($fax): static
{
$this->fax = $fax;
return $this;
}
/**
* Get fax.
*
* @return string
*/
public function getFax()
{
return $this->fax;
}
/**
* Set modeGestionCoGestion.
*/
public function setModeGestionCoGestion(?ModeGestionCoGestion $modeGestionCoGestion = null): static
{
$this->modeGestionCoGestion = $modeGestionCoGestion;
return $this;
}
/**
* Get modeGestionCoGestion.
*
* @return ModeGestionCoGestion
*/
public function getModeGestionCoGestion()
{
return $this->modeGestionCoGestion;
}
/**
* Set date_1er_agrement.
*
* @param \DateTime $date1erAgrement
*/
public function setDate1erAgrement($date1erAgrement): static
{
$this->date_1er_agrement = $date1erAgrement;
return $this;
}
/**
* Get date_1er_agrement.
*
* @return \DateTime
*/
public function getDate1erAgrement()
{
return $this->date_1er_agrement;
}
/**
* Set historique.
*
* @param string $historique
*/
public function setHistorique($historique): static
{
$this->historique = $historique;
return $this;
}
/**
* Get historique.
*
* @return string
*/
public function getHistorique()
{
return $this->historique;
}
public function getHistoriqueExport()
{
return stripTagsFull($this->historique);
}
/**
* Add politiqueVille.
*/
public function addPolitiqueVille(PolitiqueVille $politiqueVille): static
{
$this->politiqueVille[] = $politiqueVille;
return $this;
}
/**
* Remove politiqueVille.
*/
public function removePolitiqueVille(PolitiqueVille $politiqueVille): void
{
$this->politiqueVille->removeElement($politiqueVille);
}
/**
* Get politiqueVille.
*
* @return Collection
*/
public function getPolitiqueVille()
{
return $this->politiqueVille;
}
/**
* Get politiqueVilleExport
* pour l'export xls des fiches structures.
*/
public function getPolitiqueVilleExport(): string
{
$result = '';
$i = 0;
$max = is_countable($this->politiqueVille) ? count($this->politiqueVille) : 0;
foreach ($this->politiqueVille as $politique) {
++$i;
$separator = '';
if ($i < $max) {
$separator = ' / ';
}
$result .= $politique->getNom().$separator;
}
return $result;
}
/**
* Add actions.
*/
public function addAction(Action $actions): static
{
$this->actions[] = $actions;
return $this;
}
/**
* Remove actions.
*/
public function removeAction(Action $actions): void
{
$this->actions->removeElement($actions);
}
/**
* Get actions.
*
* @return Collection
*/
public function getActions()
{
return $this->actions;
}
/**
* Set populationZoneCompetence.
*
* @param int $population_zone_competence
*/
public function setPopulationZoneCompetence($population_zone_competence): static
{
$this->population_zone_competence = $population_zone_competence;
return $this;
}
/**
* Get populationZoneCompetence.
*
* @return int
*/
public function getPopulationZoneCompetence()
{
return $this->population_zone_competence;
}
/**
* Set agrement.
*/
public function setAgrement(?Agrement $agrement = null): static
{
$this->agrement = $agrement;
return $this;
}
/**
* Get agrement.
*
* @return Agrement
*/
public function getAgrement()
{
return $this->agrement;
}
/**
* Set nbPersonneAdhesion.
*
* @param int $nbPersonneAdhesion
*/
public function setNbPersonneAdhesion($nbPersonneAdhesion): static
{
$this->nbPersonneAdhesion = $nbPersonneAdhesion;
return $this;
}
/**
* Get nbPersonneAdhesion.
*
* @return int
*/
public function getNbPersonneAdhesion()
{
return $this->nbPersonneAdhesion;
}
/**
* Set isGensVoyage.
*
* @param bool $isGensVoyage
*/
public function setIsGensVoyage($isGensVoyage): static
{
$this->isGensVoyage = $isGensVoyage;
return $this;
}
/**
* Get isGensVoyage.
*
* @return bool
*/
public function getIsGensVoyage()
{
return $this->isGensVoyage;
}
/**
* Set nbParticipantActivite.
*
* @param int $nbParticipantActivite
*/
public function setNbParticipantActivite($nbParticipantActivite): static
{
$this->nbParticipantActivite = $nbParticipantActivite;
return $this;
}
/**
* Get nbParticipantActivite.
*
* @return int
*/
public function getNbParticipantActivite()
{
return $this->nbParticipantActivite;
}
/**
* Set nbParticipantAction.
*
* @param int $nbParticipantAction
*/
public function setNbParticipantAction($nbParticipantAction): static
{
$this->nbParticipantAction = $nbParticipantAction;
return $this;
}
/**
* Get nbParticipantAction.
*
* @return int
*/
public function getNbParticipantAction()
{
return $this->nbParticipantAction;
}
/**
* Set nbParticipantPonctuel.
*
* @param int $nbParticipantPonctuel
*/
public function setNbParticipantPonctuel($nbParticipantPonctuel): static
{
$this->nbParticipantPonctuel = $nbParticipantPonctuel;
return $this;
}
/**
* Get nbParticipantPonctuel.
*
* @return int
*/
public function getNbParticipantPonctuel()
{
return $this->nbParticipantPonctuel;
}
/**
* Set dureeAgrement.
*
* @param int $dureeAgrement
*/
public function setDureeAgrement($dureeAgrement): static
{
$this->dureeAgrement = $dureeAgrement;
return $this;
}
/**
* Get dureeAgrement.
*
* @return int
*/
public function getDureeAgrement()
{
return $this->dureeAgrement;
}
/**
* Set nbCommuneUrbain.
*
* @param int $nbCommuneUrbain
*/
public function setNbCommuneUrbain($nbCommuneUrbain): static
{
$this->nbCommuneUrbain = $nbCommuneUrbain;
return $this;
}
/**
* Get nbCommuneUrbain.
*
* @return int
*/
public function getNbCommuneUrbain()
{
return $this->nbCommuneUrbain;
}
/**
* Set nbCommuneRural.
*
* @param int $nbCommuneRural
*/
public function setNbCommuneRural($nbCommuneRural): static
{
$this->nbCommuneRural = $nbCommuneRural;
return $this;
}
/**
* Get nbCommuneRural.
*
* @return int
*/
public function getNbCommuneRural()
{
return $this->nbCommuneRural;
}
/**
* Add fichesAction.
*/
public function addFichesAction(FicheAction $fichesAction): static
{
$this->fichesAction[] = $fichesAction;
return $this;
}
/**
* Remove fichesAction.
*/
public function removeFichesAction(FicheAction $fichesAction): void
{
$this->fichesAction->removeElement($fichesAction);
}
/**
* Get fichesAction.
*
* @return Collection
*/
public function getFichesAction()
{
return $this->fichesAction;
}
/**
* Set observation.
*
* @param string $observation
*/
public function setObservation($observation): static
{
$this->observation = $observation;
return $this;
}
/**
* Get observation.
*
* @return string
*/
public function getObservation()
{
return $this->observation;
}
/**
* Set agrementDuree.
*/
public function setAgrementDuree(?AgrementDuree $agrementDuree = null): static
{
$this->agrementDuree = $agrementDuree;
return $this;
}
/**
* Get agrementDuree.
*
* @return AgrementDuree
*/
public function getAgrementDuree()
{
return $this->agrementDuree;
}
/**
* Set axeProjet1.
*
* @param string $axeProjet1
*/
public function setAxeProjet1($axeProjet1): static
{
$this->axeProjet1 = $axeProjet1;
return $this;
}
/**
* Get axeProjet1.
*
* @return string
*/
public function getAxeProjet1()
{
return $this->axeProjet1;
}
/**
* Set axeProjet2.
*
* @param string $axeProjet2
*/
public function setAxeProjet2($axeProjet2): static
{
$this->axeProjet2 = $axeProjet2;
return $this;
}
/**
* Get axeProjet2.
*
* @return string
*/
public function getAxeProjet2()
{
return $this->axeProjet2;
}
/**
* Set axeProjet3.
*
* @param string $axeProjet3
*/
public function setAxeProjet3($axeProjet3): static
{
$this->axeProjet3 = $axeProjet3;
return $this;
}
/**
* Get axeProjet3.
*
* @return string
*/
public function getAxeProjet3()
{
return $this->axeProjet3;
}
/**
* Set axeProjet4.
*
* @param string $axeProjet4
*/
public function setAxeProjet4($axeProjet4): static
{
$this->axeProjet4 = $axeProjet4;
return $this;
}
/**
* Get axeProjet4.
*
* @return string
*/
public function getAxeProjet4()
{
return $this->axeProjet4;
}
/**
* Set axeProjet5.
*
* @param string $axeProjet5
*/
public function setAxeProjet5($axeProjet5): static
{
$this->axeProjet5 = $axeProjet5;
return $this;
}
/**
* Get axeProjet5.
*
* @return string
*/
public function getAxeProjet5()
{
return $this->axeProjet5;
}
/**
* Set token.
*
* @param string $token
*/
public function setToken($token): static
{
$this->token = $token;
return $this;
}
/**
* Get token.
*
* @return string
*/
public function getToken()
{
return $this->token;
}
/**
* Add adherentAutreFederation2.
*/
public function addAdherentAutreFederation2(AdherentAutreFederation $adherentAutreFederation2): static
{
$this->adherentAutreFederation2[] = $adherentAutreFederation2;
return $this;
}
/**
* Remove adherentAutreFederation2.
*/
public function removeAdherentAutreFederation2(AdherentAutreFederation $adherentAutreFederation2): void
{
$this->adherentAutreFederation2->removeElement($adherentAutreFederation2);
}
/**
* Get adherentAutreFederation2.
*
* @return Collection
*/
public function getAdherentAutreFederation2()
{
return $this->adherentAutreFederation2;
}
/**
* Set grandeRegion.
*/
public function setGrandeRegion(?GrandeRegion $grandeRegion = null): static
{
$this->grandeRegion = $grandeRegion;
return $this;
}
/**
* Get grandeRegion.
*
* @return GrandeRegion
*/
public function getGrandeRegion()
{
return $this->grandeRegion;
}
/**
* Set ficheSynthetique.
*/
public function setFicheSynthetique(?FicheSynthetique $ficheSynthetique = null): static
{
$this->ficheSynthetique = $ficheSynthetique;
return $this;
}
/**
* Get ficheSynthetique.
*
* @return FicheSynthetique
*/
public function getFicheSynthetique()
{
return $this->ficheSynthetique;
}
/**
* Set directorName.
*
* @param string $directorName
*/
public function setDirectorName($directorName): static
{
$this->directorName = $directorName;
return $this;
}
/**
* Get directorName.
*
* @return string
*/
public function getDirectorName()
{
return $this->directorName;
}
/**
* Set presidentName.
*
* @param string $presidentName
*/
public function setPresidentName($presidentName): static
{
$this->presidentName = $presidentName;
return $this;
}
/**
* Get presidentName.
*
* @return string
*/
public function getPresidentName()
{
return $this->presidentName;
}
/**
* If manually uploading a file (i.e. not using Symfony Form) ensure an instance
* of 'UploadedFile' is injected into this setter to trigger the update. If this
* bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
* must be able to accept an instance of 'File' as the bundle will inject one here
* during Doctrine hydration.
*
* @return Product
*/
public function setLogoFile(?File $image = null): static
{
$this->logoFile = $image;
if ($image instanceof File) {
// It is required that at least one field changes if you are using doctrine
// otherwise the event listeners won't be called and the file is lost
$this->updatedAt = new \DateTime('now');
}
return $this;
}
public function getLogoFile(): ?File
{
return $this->logoFile;
}
public function setLogo($file = null): void
{
$this->logo = $file;
}
public function getLogo()
{
return $this->logo;
}
/**
* Set haveSystemeAdhesion.
*
* @param bool $haveSystemeAdhesion
*/
public function setHaveSystemeAdhesion($haveSystemeAdhesion): static
{
$this->haveSystemeAdhesion = $haveSystemeAdhesion;
return $this;
}
/**
* Get haveSystemeAdhesion.
*
* @return bool
*/
public function getHaveSystemeAdhesion()
{
return $this->haveSystemeAdhesion;
}
/**
* Set createdAt.
*/
public function setCreatedAt(?\DateTime $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt.
*/
public function getCreatedAt(): ?\DateTime
{
return $this->createdAt;
}
/**
* Set updatedAt.
*/
public function setUpdatedAt(\DateTime $updatedAt): static
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt.
*/
public function getUpdatedAt(): \DateTime
{
return $this->updatedAt;
}
/**
* Set latitude.
*
* @param float $latitude
*/
public function setLatitude($latitude): static
{
if (is_string($latitude)) {
$latitude = floatval($latitude);
}
$this->latitude = $latitude;
return $this;
}
/**
* Get latitude.
*
* @return float
*/
public function getLatitude()
{
return $this->latitude;
}
/**
* Set longitude.
*
* @param float $longitude
*/
public function setLongitude($longitude): static
{
if (is_string($longitude)) {
$longitude = floatval($longitude);
}
$this->longitude = $longitude;
return $this;
}
/**
* Get longitude.
*
* @return float
*/
public function getLongitude()
{
return $this->longitude;
}
/**
* Set isDelete.
*
* @param bool $isDelete
*/
public function setIsDelete($isDelete): static
{
$this->isDelete = $isDelete;
return $this;
}
/**
* Get isDelete.
*
* @return bool
*/
public function getIsDelete()
{
return $this->isDelete;
}
/**
* Set activityDomain.
*
* @param string $activityDomain
*/
public function setActivityDomain($activityDomain): static
{
$this->activityDomain = $activityDomain;
return $this;
}
/**
* Get activityDomain.
*
* @return string
*/
public function getActivityDomain()
{
return $this->activityDomain;
}
/**
* Set canShowCSO.
*
* @param bool $canShowCSO
*/
public function setCanShowCSO($canShowCSO): static
{
$this->canShowCSO = $canShowCSO;
return $this;
}
/**
* Get canShowCSO.
*/
public function getCanShowCSO(): ?bool
{
return $this->canShowCSO;
}
/**
* Set canShowEVS.
*
* @param bool $canShowEVS
*/
public function setCanShowEVS($canShowEVS): static
{
$this->canShowEVS = $canShowEVS;
return $this;
}
/**
* Get canShowEVS.
*/
public function getCanShowEVS(): ?bool
{
return $this->canShowEVS;
}
/**
* Set hasEVSAgrement.
*
* @param bool $hasEVSAgrement
*/
public function setHasEVSAgrement($hasEVSAgrement): static
{
$this->hasEVSAgrement = $hasEVSAgrement;
return $this;
}
/**
* Get hasEVSAgrement.
*/
public function getHasEVSAgrement(): ?bool
{
return $this->hasEVSAgrement;
}
/**
* Set qpvNumbers.
*
* @param string $qpvNumbers
*/
public function setQpvNumbers($qpvNumbers): static
{
$this->qpvNumbers = $qpvNumbers;
return $this;
}
public function getQpvsForExport(): string
{
$return = '';
$separator = '';
foreach ($this->qpvs as $qpv) {
$return .= $separator.$qpv->getCodeQuartier();
$separator = ', ';
}
return $return;
}
/**
* Get qpvNumbers.
*/
public function getQpvNumbers(): string
{
return $this->qpvNumbers.'anciennes données';
}
/**
* Set zrrCities.
*
* @param string $zrrCities
*/
public function setZrrCities($zrrCities): static
{
$this->zrrCities = $zrrCities;
return $this;
}
/**
* Get zrrCities.
*
* @return string
*/
public function getZrrCities()
{
return $this->zrrCities;
}
/**
* Set isMultiSites.
*
* @param bool $isMultiSites
*/
public function setIsMultiSites($isMultiSites): static
{
$this->isMultiSites = $isMultiSites;
return $this;
}
/**
* Get isMultiSites.
*
* @return bool
*/
public function getIsMultiSites()
{
return $this->isMultiSites;
}
/**
* Set isItinerante.
*
* @param bool $isItinerante
*/
public function setIsItinerante($isItinerante): static
{
$this->isItinerante = $isItinerante;
return $this;
}
/**
* Get isItinerante.
*
* @return bool
*/
public function getIsItinerante()
{
return $this->isItinerante;
}
/**
* Set hasactionToHelpPersonRightsAccess.
*
* @param bool $hasactionToHelpPersonRightsAccess
*/
public function setHasactionToHelpPersonRightsAccess($hasactionToHelpPersonRightsAccess): static
{
$this->hasactionToHelpPersonRightsAccess = $hasactionToHelpPersonRightsAccess;
return $this;
}
/**
* Get hasactionToHelpPersonRightsAccess.
*
* @return bool
*/
public function getHasactionToHelpPersonRightsAccess()
{
return $this->hasactionToHelpPersonRightsAccess;
}
/**
* Set actionsToHelpPersonRightsAccess.
*
* @param array $actionsToHelpPersonRightsAccess
*/
public function setActionsToHelpPersonRightsAccess($actionsToHelpPersonRightsAccess): static
{
$this->actionsToHelpPersonRightsAccess = $actionsToHelpPersonRightsAccess;
return $this;
}
/**
* Get actionsToHelpPersonRightsAccess.
*
* @return array
*/
public function getActionsToHelpPersonRightsAccess()
{
// if($this->actionsToHelpPersonRightsAccess==""){
// return [];
// }
return $this->actionsToHelpPersonRightsAccess;
}
/**
* Set actionsToHelpPersonRightsAccessOther.
*
* @param string $actionsToHelpPersonRightsAccessOther
*/
public function setActionsToHelpPersonRightsAccessOther($actionsToHelpPersonRightsAccessOther): static
{
$this->actionsToHelpPersonRightsAccessOther = $actionsToHelpPersonRightsAccessOther;
return $this;
}
/**
* Get actionsToHelpPersonRightsAccessOther.
*
* @return string
*/
public function getActionsToHelpPersonRightsAccessOther()
{
return $this->actionsToHelpPersonRightsAccessOther;
}
/**
* Add systemeAdhesionGoal.
*/
public function addSystemeAdhesionGoal(SystemeAdhesionGoal $systemeAdhesionGoal): static
{
$this->systemeAdhesionGoal[] = $systemeAdhesionGoal;
return $this;
}
/**
* Remove systemeAdhesionGoal.
*/
public function removeSystemeAdhesionGoal(SystemeAdhesionGoal $systemeAdhesionGoal): void
{
$this->systemeAdhesionGoal->removeElement($systemeAdhesionGoal);
}
/**
* Get systemeAdhesionGoal.
*
* @return Collection
*/
public function getSystemeAdhesionGoal()
{
return $this->systemeAdhesionGoal;
}
/**
* Add qpv.
*/
public function addQpv(QPV $qpv): static
{
$this->qpvs[] = $qpv;
return $this;
}
/**
* Remove qpv.
*/
public function removeQpv(QPV $qpv): void
{
$this->qpvs->removeElement($qpv);
}
/**
* Get qpvs.
*
* @return Collection
*/
public function getQpvs()
{
return $this->qpvs;
}
/**
* Set nbAssociationAdhereProjetStructure.
*
* @param int $nbAssociationAdhereProjetStructure
*/
public function setNbAssociationAdhereProjetStructure($nbAssociationAdhereProjetStructure): static
{
$this->nbAssociationAdhereProjetStructure = $nbAssociationAdhereProjetStructure;
return $this;
}
/**
* Get nbAssociationAdhereProjetStructure.
*
* @return int
*/
public function getNbAssociationAdhereProjetStructure()
{
return $this->nbAssociationAdhereProjetStructure;
}
}