<?php

namespace AppBundle\Entity\Organization;

use AppBundle\Entity\AccessAndFunction\Access;
use AppBundle\Entity\Billing\BillingExportSetting;
use AppBundle\Entity\Billing\BillingSetting;
use AppBundle\Entity\Booking\Course;
use AppBundle\Entity\Booking\EducationalProject;
use AppBundle\Entity\Booking\Event;
use AppBundle\Entity\Booking\Examen;
use AppBundle\Entity\Core\ContactPoint;
use AppBundle\Entity\Donor\Donor;
use AppBundle\Enum\Core\AddressPostalOrganizationTypeEnum;
use AppBundle\Enum\Core\ContactPointTypeEnum;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use AppBundle\Entity\Network\NetworkOrganization;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Person\Person;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;
use AppBundle\Entity\Bank\BankAccount;
use AppBundle\Entity\Traits\AddressPostalType;
use AppBundle\Validator\Constraints\Delete as OpentalentDelete;
use AppBundle\Entity\Booking\OrganizationHoliday;
use AppBundle\Entity\Traits\ContactPointType;
use AppBundle\Entity\Core\ContactInterface;

/**
 * Structure, organisation
 *
 * @Iri("http://schema.org/Organization")
 * @OpentalentDelete\EntityDelete()
 */
#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Organization\Repository\OrganizationRepository')]
class Organization implements ContactInterface
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    use AddressPostalType;
    use ContactPointType;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['organization', 'access_details', 'network_list', 'federations_list', 'networkmanagers_list', 'network_artist_school_list', 'rule', 'accesses_rules', 'all_accesses_list', 'adherent_list', 'organization_cotisation_steps', 'cotisation_responsibles_accesses', 'onlineregistrationsettings_edit', 'organization_communication_edit', 'onlineregistration_infos', 'organization_params_list'])]
    private $id;
    /**
     * @var ArrayCollection<OrganizationAddressPostal>
     */
    #[Assert\Valid]
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization', 'organization_organizationaddresspostal', 'network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'organization_details', 'organization_cotisation_steps', 'organization_params_list'])]
    private $organizationAddressPostal;
    /**
     * @var ArrayCollection<OrganizationAddressPostal>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
    #[Groups(['network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'template'])]
    private $organizationAddressPostalContact;
    /**
     * @var ArrayCollection<OrganizationAddressPostal>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
    #[Groups(['network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list'])]
    private $organizationAddressPostalBill;
    /**
     * @var ArrayCollection<OrganizationAddressPostal>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationAddressPostal', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
    #[Groups(['network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'cmf_network_organizations'])]
    private $organizationAddressPostalPrincipal;
    #[Assert\Valid]
    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\ContactPoint', cascade: ['persist'], orphanRemoval: true, inversedBy: 'organization')]
    #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
    #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
    #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]
    #[Groups(['organization_contactpoint', 'network_list', 'federations_list', 'network_artist_school_list', 'organization_details', 'organization_cotisation_steps', 'onlineregistration_infos_organization', 'cmf_network_organizations'])]
    private $contactPoint;
    #[Assert\Valid]
    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Bank\BankAccount', inversedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
    #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
    #[ORM\JoinColumn(name: 'bankAccount_id', referencedColumnName: 'id', unique: true)]
    #[Groups(['organization_bankaccount', 'organization_details'])]
    private $bankAccount;
    /**
     * @var string A short description of the item.
     *
     * @Iri("https://schema.org/description")
     */
    #[ORM\Column(type: 'text', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $description;
    /**
     * @var File An image of the item. This can be a [URL](http://schema.org/URL) or a fully described [ImageObject](http://schema.org/ImageObject).
     * @Iri("https://schema.org/image")
     */
    #[Assert\Valid]
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'organizationImages', cascade: ['persist'])]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['organization', 'organization_cotisation_steps', 'organization_communication_edit'])]
    private $image;
    /**
     * @var File An image of the item. This can be a [URL](http://schema.org/URL) or a fully described [ImageObject](http://schema.org/ImageObject).
     * @Iri("https://schema.org/image")
     *
     */
    #[Assert\Valid]
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'organizationLogos', cascade: ['persist'])]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['organization', 'network_list', 'network_artist_school_list', 'organization_details', 'organization_cotisation_steps'])]
    private $logo;
    /**
     * @var string The name of the item.
     *
     * @Iri("https://schema.org/name")
     */
    #[ORM\Column(type: 'string', nullable: true, length: 128)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'reportmessage', 'rule', 'accesses_rules', 'organization_reference', 'accesses_rules_organization', 'organization_create', 'all_accesses_list_organization', 'organization_details', 'organization_cotisation_steps', 'onlineregistration_infos_organization', 'cmf_network_organizations', 'cmf_network_organizations', 'organization_params_list', 'organization_params_list', 'organization_params_list_network'])]
    private $name;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date]
    #[Groups(['organization', 'organization_details'])]
    private $creationDate;
    /**
     * @var string
     *
     *
     * -----------------------
     * The validation of the identifier is managed by the creation process
     * OpentalentAssert\IdentifierNetwork(network="CMF")
     * -----------------------
     */
    #[ORM\Column(type: 'string', length: 14, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'access_details_organization', 'network_artist_school_list', 'federations_list', 'network_list', 'organization_details', 'organization_cotisation_steps', 'cmf_network_organizations', 'organization_params_list'])]
    private $identifier;
    /**
     * @var \DateTime
     */
    #[ORM\Column(type: 'date', nullable: true)]
    #[Assert\Date]
    #[Groups(['organization', 'organization_details'])]
    private $declarationDate;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string')]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\legalEnum', 'toArray'])]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $legalStatus;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 14, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $siretNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 10, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $waldecNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 5, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $apeNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 50, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $tvaNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string')]
    #[Assert\Type(type: 'string')]
    #[Assert\NotNull]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\principalTypeEnum', 'toArray'])]
    #[Groups(['organization', 'network_list', 'federations_list', 'networkmanagers_list_organization', 'network_artist_school_list', 'organization_create', 'organization_details', 'organization_cotisation_steps', 'cmf_network_organizations'])]
    private $principalType;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 40, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization'])]
    private $otherType;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 80, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $acronym;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
    private $facebook;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
    private $twitter;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
    private $instagram;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_create', 'organization_cotisation_steps', 'organization_communication_edit'])]
    private $youtube;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $collectiveAgreement;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\opcaEnum', 'toArray'])]
    #[Groups(['organization', 'organization_details'])]
    private $opca;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $icomNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $urssafNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 20, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $youngApproval;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 20, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $trainingApproval;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 50, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $otherApproval;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 35, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $prefectureName;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 20, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details', 'organization_cotisation_steps'])]
    private $prefectureNumber;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\CategoryEnum', 'toArray'])]
    #[Groups(['organization', 'networkmanagers_list_organization'])]
    private $category;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\schoolCategoryEnum', 'toArray'])]
    #[Groups(['organization', 'organization_details'])]
    private $schoolCategory;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\typeEstablishmentEnum', 'toArray'])]
    #[Groups(['organization', 'organization_details'])]
    private $typeEstablishment;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Assert\Choice(callback: ['\AppBundle\Enum\Organization\typeEstablishmentDetailEnum', 'toArray'])]
    #[Groups(['organization'])]
    private $typeEstablishmentDetail;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['organization', 'organization_details'])]
    private $budget;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', nullable: true)]
    #[Assert\Type(type: 'boolean')]
    #[Groups(['organization', 'organization_details'])]
    private $isPedagogicIsPrincipalActivity;
    /**
     * @var float
     */
    #[ORM\Column(type: 'float', nullable: true)]
    #[Assert\Type(type: 'float')]
    #[Groups(['organization'])]
    private $pedagogicBudget;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'organizationContacts')]
    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
    #[Groups(['organization'])]
    private $contactPerson;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', nullable: true)]
    #[Assert\Type(type: 'boolean')]
    #[Groups(['organization'])]
    private $isPerformanceContractor;
    /**
     * @var string
     */
    #[ORM\Column(type: 'string', length: 20, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_details'])]
    private $ffecApproval;
    /**
     * @var bool
     */
    #[Assert\Type(type: 'boolean')]
    #[Groups(['organization', 'federations_list'])]
    private $hasChildren = false;
    /**
     * @var ArrayCollection<NetworkOrganization>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Network\NetworkOrganization', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'])]
    #[Groups(['organization_networkorganization', 'organization', 'network_list', 'organization_create', 'organization_details', 'organization_cotisation_steps', 'organization_params_list'])]
    private $network;
    /**
     * @var ArrayCollection<NetworkOrganization>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Network\NetworkOrganization', mappedBy: 'parent', orphanRemoval: true, cascade: ['persist'])]
    #[Groups(['organization_networkorganization', 'network_list', 'organization_params_list_network'])]
    private $networkChild;
    /**
     * @var bool
     */
    #[ORM\Column(type: 'boolean', options: ['default' => false])]
    #[Assert\Type(type: 'boolean')]
    #[Assert\NotNull]
    #[Groups(['organization', 'organization_details', 'organization_communication_edit'])]
    private $portailVisibility = false;
    /**
     *
     * @var Setting
     */
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Settings', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'], fetch: 'EAGER')]
    #[Groups(['organization', 'organization_params_list'])]
    private $settings;
    /**
     * @var Parameters
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'Parameters', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
    #[Groups(['organization', 'network_list', 'federations_list', 'network_list', 'network_artist_school_list', 'organization_cotisation_steps', 'organization_create'])]
    private $parameters;
    /**
     * @var ArrayCollection<OrganizationHoliday>
     */
    #[Assert\Valid]
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\OrganizationHoliday', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization_organizationholiday'])]
    private $holidays;
    /**
     * @var ArrayCollection<OrganizationLicence>
     */
    #[Assert\Valid]
    #[ORM\OneToMany(targetEntity: 'OrganizationLicence', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization_organizationlicence', 'organization_details'])]
    private $organizationLicences;
    /**
     * @var BillingSetting
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillingSetting', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
    #[Groups(['organization'])]
    private $billingSetting;
    /**
     * @var BillingExportSetting
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillingExportSetting', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
    #[Groups(['organization'])]
    private $billingExportSetting;
    /**
     * @var ArrayCollection<Access>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization_access', 'organization_create'])]
    private $access;
    /**
     * @var ArrayCollection<Course>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Course', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_booking'])]
    private $courses;
    /**
     * @var ArrayCollection<EducationalProject>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_booking'])]
    private $educationalProjects;
    /**
     * @var ArrayCollection<Event>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Event', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_booking'])]
    private $events;
    /**
     * @var ArrayCollection<Examen>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Examen', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_booking'])]
    private $examens;
    /**
     * @var ArrayCollection<CriteriaNotation>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\CriteriaNotation', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'])]
    #[Groups(['organization_criterianotation'])]
    private $critereNotations;
    /**
     * @var ArrayCollection<Cycle>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\Cycle', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_cycle'])]
    private $cycles;
    /**
     * @var ArrayCollection<EducationTiming>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationTiming', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization_educationTiming'])]
    #[Assert\Valid]
    private $educationTimings;
    /**
     * @var ArrayCollection<EducationCategory>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\EducationCategory', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_educationcategory'])]
    private $educationCategories;
    /**
     * @var ArrayCollection<PeriodNotation>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Education\PeriodNotation', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_periodnotation'])]
    private $periodNotations;
    /**
     * @var ArrayCollection<Document>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\Document', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_document'])]
    private $documents;
    /**
     * @var ArrayCollection<File>
     */
    #[Groups(['organization_file'])]
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'organization', orphanRemoval: true)]
    private $files;
    /**
     * @var ArrayCollection<Notification>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\Notification', mappedBy: 'recipientOrganization', orphanRemoval: true)]
    #[Groups(['organization_notification'])]
    private $notifications;
    /**
     * @var ArrayCollection<Message>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Message\Message', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_message'])]
    private $messages;
    /**
     * @var ArrayCollection<Activity>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Activity', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'])]
    #[Groups(['organization_activity', 'network_list', 'organization_cotisation_steps'])]
    private $activities;
    /**
     * @var ArrayCollection<Jury>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\Jury', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_jury'])]
    private $juries;
    /**
     * @var ArrayCollection<Commission>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Person\Commission', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_commission'])]
    private $commissions;
    /**
     * @var ArrayCollection<Place>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Place\Place', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_place'])]
    private $places;
    /**
     * @var ArrayCollection<Attendance>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\Attendance', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_attendance'])]
    private $attendances;
    /**
     * @var ArrayCollection<Equipment>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Equipment', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_equipment'])]
    private $equipments;
    /**
     * @var ArrayCollection<Equipment>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\Intangible', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_intangible'])]
    private $intangibles;
    /**
     * @var ArrayCollection<Donor>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Donor\Donor', mappedBy: 'organization', orphanRemoval: true)]
    #[Groups(['organization_donor', 'access_details_organization'])]
    private $donors;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer', nullable: true)]
    private $cmsId;
    /**
     * @var string
     */
    #[Groups(['network_list', 'federations_list', 'parameters'])]
    private $emailAdminAccess;
    /**
     * @var string
     */
    #[Groups(['login_admin'])]
    private $loginAdminAccess;
    /**
     * @var string
     */
    #[Groups(['organization', 'organization_params_list'])]
    private $idAdminAccess;
    /**
     *
     * @var OnlineRegistrationSettings
     */
    #[Assert\Valid]
    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\OnlineRegistrationSettings', mappedBy: 'organization', orphanRemoval: true, cascade: ['persist'], fetch: 'EAGER')]
    #[Groups(['organization_onlineregistrationstetings', 'onlineregistrationsettings_edit'])]
    private $onlineRegistrationSettings;
    /**
     * @var ArrayCollection<OrganizationLicence>
     */
    #[Assert\Valid]
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\CotisationByYear', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization_cotisationbyyears', 'organization_cotisation_steps'])]
    private $cotisationByYears;
    /**
     * this field is only for CMF temporary ...
     * @var string
     */
    #[Groups(['organization', 'network_list', 'federations_list', 'networkmanagers_list_organization'])]
    private $temporaryFieldForCMF;
    /**
     * @var array
     */
    #[ORM\ManyToMany(targetEntity: 'TypeOfPractice', inversedBy: 'organization')]
    #[ORM\JoinTable(name: 'organization_type_of_practices')]
    #[Groups(['organization', 'organization_cotisation_steps', 'network_list'])]
    private $typeOfPractices;
    /**
     * @var string
     */
    #[ORM\Column(type: 'text', nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['organization', 'organization_cotisation_steps'])]
    private $otherPractice;
    /**
     * @var ArrayCollection<OrganizationArticle>
     */
    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Organization\OrganizationArticle', mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
    #[Groups(['organization_organizationarticles', 'organization_communication_edit', 'organization_cotisation_steps'])]
    private $organizationArticles;
    /**
     * @var ArrayCollection<Tag>
     */
    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'organizations')]
    #[ORM\JoinTable(name: 'tag_organization', joinColumns: [], inverseJoinColumns: [])]
    #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]
    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
    #[Assert\Valid]
    #[Groups(['organization_tags', 'network_list', 'federations_list', 'manage_tags'])]
    private $tags;
    public function __construct()
    {
        $this->network = new ArrayCollection();
        $this->networkChild = new ArrayCollection();
        $this->contactPoint = new ArrayCollection();
        $this->bankAccount = new ArrayCollection();
        $this->organizationAddressPostal = new ArrayCollection();
        $this->holidays = new ArrayCollection();
        $this->organizationLicences = new ArrayCollection();
        $this->access = new ArrayCollection();
        $this->courses = new ArrayCollection();
        $this->educationalProjects = new ArrayCollection();
        $this->events = new ArrayCollection();
        $this->examens = new ArrayCollection();
        $this->critereNotations = new ArrayCollection();
        $this->cycles = new ArrayCollection();
        $this->educationTimings = new ArrayCollection();
        $this->educationCategories = new ArrayCollection();
        $this->periodNotations = new ArrayCollection();
        $this->documents = new ArrayCollection();
        $this->files = new ArrayCollection();
        $this->notifications = new ArrayCollection();
        $this->messages = new ArrayCollection();
        $this->activities = new ArrayCollection();
        $this->juries = new ArrayCollection();
        $this->commissions = new ArrayCollection();
        $this->places = new ArrayCollection();
        $this->attendances = new ArrayCollection();
        $this->equipments = new ArrayCollection();
        $this->intangibles = new ArrayCollection();
        $this->donors = new ArrayCollection();
        $this->cotisationByYears = new ArrayCollection();
        $this->typeOfPractices = new ArrayCollection();
        $this->organizationArticles = new ArrayCollection();
        $this->tags = new ArrayCollection();
    }
    /**
     * Sets id.
     *
     * @param int $id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }
    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Add donor
     *
     * @param \AppBundle\Entity\Donor\Donor $donor
     *
     * @return Organization
     */
    public function addDonor(\AppBundle\Entity\Donor\Donor $donor)
    {
        $donor->setOrganization($this);
        $this->donors[] = $donor;

        return $this;
    }
    /**
     * Remove donor
     *
     * @param \AppBundle\Entity\Donor\Donor $donor
     */
    public function removeDonor(\AppBundle\Entity\Donor\Donor $donor)
    {
        $this->donors->removeElement($donor);
    }
    /**
     * Get donors
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getDonors()
    {
        return $this->donors;
    }
    /**
     * Sets description.
     *
     * @param string $description
     *
     * @return $this
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }
    /**
     * Gets description.
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Sets image.
     *
     * @param string $image
     *
     * @return $this
     */
    public function setImage($image)
    {
        $this->image = $image;

        return $this;
    }
    /**
     * Gets image.
     *
     * @return string
     */
    public function getImage()
    {
        return $this->image;
    }
    /**
     * Sets logo.
     *
     * @param string $logo
     *
     * @return $this
     */
    public function setLogo($logo)
    {
        $this->logo = $logo;

        return $this;
    }
    /**
     * Gets logo.
     *
     * @return string
     */
    public function getLogo()
    {
        return $this->logo;
    }
    /**
     * Sets name.
     *
     * @param string $name
     *
     * @return $this
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }
    /**
     * Gets name.
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }
    /**
     * Sets creationDate.
     *
     * @param \DateTime $creationDate
     *
     * @return $this
     */
    public function setCreationDate(\DateTime $creationDate = null)
    {
        $this->creationDate = $creationDate;

        return $this;
    }
    /**
     * Gets creationDate.
     *
     * @return \DateTime
     */
    public function getCreationDate()
    {
        return $this->creationDate ? $this->creationDate->format('Y-m-d') : $this->creationDate;
    }
    /**
     * Sets identifier.
     *
     * @param string $identifier
     *
     * @return $this
     */
    public function setIdentifier($identifier)
    {
        $this->identifier = $identifier;

        return $this;
    }
    /**
     * Gets identifier.
     *
     * @return string
     */
    public function getIdentifier()
    {
        return $this->identifier;
    }
    /**
     * Sets declarationDate.
     *
     * @param \DateTime $declarationDate
     *
     * @return $this
     */
    public function setDeclarationDate(\DateTime $declarationDate = null)
    {
        $this->declarationDate = $declarationDate;

        return $this;
    }
    /**
     * Gets declarationDate.
     *
     * @return \DateTime
     */
    public function getDeclarationDate()
    {
        return $this->declarationDate ? $this->declarationDate->format('Y-m-d') : $this->declarationDate;
    }
    /**
     * Sets legalStatus.
     *
     * @param string $legalStatus
     *
     * @return $this
     */
    public function setLegalStatus($legalStatus)
    {
        $this->legalStatus = $legalStatus;

        return $this;
    }
    /**
     * Gets legalStatus.
     *
     * @return string
     */
    public function getLegalStatus()
    {
        return $this->legalStatus;
    }
    /**
     * Sets siretNumber.
     *
     * @param string $siretNumber
     *
     * @return $this
     */
    public function setSiretNumber($siretNumber)
    {
        $this->siretNumber = $siretNumber;

        return $this;
    }
    /**
     * Gets siretNumber.
     *
     * @return string
     */
    public function getSiretNumber()
    {
        return $this->siretNumber;
    }
    /**
     * Sets waldecNumber.
     *
     * @param string $waldecNumber
     *
     * @return $this
     */
    public function setWaldecNumber($waldecNumber)
    {
        $this->waldecNumber = $waldecNumber;

        return $this;
    }
    /**
     * Gets waldecNumber.
     *
     * @return string
     */
    public function getWaldecNumber()
    {
        return $this->waldecNumber;
    }
    /**
     * Sets apeNumber.
     *
     * @param string $apeNumber
     *
     * @return $this
     */
    public function setApeNumber($apeNumber)
    {
        $this->apeNumber = $apeNumber;

        return $this;
    }
    /**
     * Gets apeNumber.
     *
     * @return string
     */
    public function getApeNumber()
    {
        return $this->apeNumber;
    }
    /**
     * Sets tvaNumber.
     *
     * @param string $tvaNumber
     *
     * @return $this
     */
    public function setTvaNumber($tvaNumber)
    {
        $this->tvaNumber = $tvaNumber;

        return $this;
    }
    /**
     * Gets tvaNumber.
     *
     * @return string
     */
    public function getTvaNumber()
    {
        return $this->tvaNumber;
    }
    /**
     * Sets principalType.
     *
     * @param string $principalType
     *
     * @return $this
     */
    public function setPrincipalType($principalType)
    {
        $this->principalType = $principalType;

        return $this;
    }
    /**
     * Gets principalType.
     *
     * @return string
     */
    public function getPrincipalType()
    {
        return $this->principalType;
    }
    /**
     * Sets otherType.
     *
     * @param string $otherType
     *
     * @return $this
     */
    public function setOtherType($otherType)
    {
        $this->otherType = $otherType;

        return $this;
    }
    /**
     * Gets otherType.
     *
     * @return string
     */
    public function getOtherType()
    {
        return $this->otherType;
    }
    /**
     * Sets acronym.
     *
     * @param string $acronym
     *
     * @return $this
     */
    public function setAcronym($acronym)
    {
        $this->acronym = $acronym;

        return $this;
    }
    /**
     * Gets acronym.
     *
     * @return string
     */
    public function getAcronym()
    {
        return $this->acronym;
    }
    /**
     * Sets facebook.
     *
     * @param string $facebook
     *
     * @return $this
     */
    public function setFacebook($facebook)
    {
        $this->facebook = $facebook;

        return $this;
    }
    /**
     * Gets facebook.
     *
     * @return string
     */
    public function getFacebook()
    {
        return $this->facebook;
    }
    /**
     * Sets twitter.
     *
     * @param string $twitter
     *
     * @return $this
     */
    public function setTwitter($twitter)
    {
        $this->twitter = $twitter;

        return $this;
    }
    /**
     * Gets twitter.
     *
     * @return string
     */
    public function getTwitter()
    {
        return $this->twitter;
    }
    /**
     * Sets instagram.
     *
     * @param string $instagram
     *
     * @return $this
     */
    public function setInstagram($instagram)
    {
        $this->instagram = $instagram;

        return $this;
    }
    /**
     * Gets instagram.
     *
     * @return string
     */
    public function getInstagram()
    {
        return $this->instagram;
    }
    /**
     * Sets collectiveAgreement.
     *
     * @param string $collectiveAgreement
     *
     * @return $this
     */
    public function setCollectiveAgreement($collectiveAgreement)
    {
        $this->collectiveAgreement = $collectiveAgreement;

        return $this;
    }
    /**
     * Gets collectiveAgreement.
     *
     * @return string
     */
    public function getCollectiveAgreement()
    {
        return $this->collectiveAgreement;
    }
    /**
     * Sets opca.
     *
     * @param string $opca
     *
     * @return $this
     */
    public function setOpca($opca)
    {
        $this->opca = $opca;

        return $this;
    }
    /**
     * Gets opca.
     *
     * @return string
     */
    public function getOpca()
    {
        return $this->opca;
    }
    /**
     * Sets icomNumber.
     *
     * @param string $icomNumber
     *
     * @return $this
     */
    public function setIcomNumber($icomNumber)
    {
        $this->icomNumber = $icomNumber;

        return $this;
    }
    /**
     * Gets icomNumber.
     *
     * @return string
     */
    public function getIcomNumber()
    {
        return $this->icomNumber;
    }
    /**
     * Sets urssafNumber.
     *
     * @param string $urssafNumber
     *
     * @return $this
     */
    public function setUrssafNumber($urssafNumber)
    {
        $this->urssafNumber = $urssafNumber;

        return $this;
    }
    /**
     * Gets urssafNumber.
     *
     * @return string
     */
    public function getUrssafNumber()
    {
        return $this->urssafNumber;
    }
    /**
     * Sets youngApproval.
     *
     * @param string $youngApproval
     *
     * @return $this
     */
    public function setYoungApproval($youngApproval)
    {
        $this->youngApproval = $youngApproval;

        return $this;
    }
    /**
     * Gets youngApproval.
     *
     * @return string
     */
    public function getYoungApproval()
    {
        return $this->youngApproval;
    }
    /**
     * Sets trainingApproval.
     *
     * @param string $trainingApproval
     *
     * @return $this
     */
    public function setTrainingApproval($trainingApproval)
    {
        $this->trainingApproval = $trainingApproval;

        return $this;
    }
    /**
     * Gets trainingApproval.
     *
     * @return string
     */
    public function getTrainingApproval()
    {
        return $this->trainingApproval;
    }
    /**
     * Sets otherApproval.
     *
     * @param string $otherApproval
     *
     * @return $this
     */
    public function setOtherApproval($otherApproval)
    {
        $this->otherApproval = $otherApproval;

        return $this;
    }
    /**
     * Gets otherApproval.
     *
     * @return string
     */
    public function getOtherApproval()
    {
        return $this->otherApproval;
    }
    /**
     * Sets prefectureName.
     *
     * @param string $prefectureName
     *
     * @return $this
     */
    public function setPrefectureName($prefectureName)
    {
        $this->prefectureName = $prefectureName;

        return $this;
    }
    /**
     * Gets prefectureName.
     *
     * @return string
     */
    public function getPrefectureName()
    {
        return $this->prefectureName;
    }
    /**
     * Sets prefectureNumber.
     *
     * @param string $prefectureNumber
     *
     * @return $this
     */
    public function setPrefectureNumber($prefectureNumber)
    {
        $this->prefectureNumber = $prefectureNumber;

        return $this;
    }
    /**
     * Gets prefectureNumber.
     *
     * @return string
     */
    public function getPrefectureNumber()
    {
        return $this->prefectureNumber;
    }
    /**
     * Sets category.
     *
     * @param string $category
     *
     * @return $this
     */
    public function setCategory($category)
    {
        $this->category = $category;

        return $this;
    }
    /**
     * Gets category.
     *
     * @return string
     */
    public function getCategory()
    {
        return $this->category;
    }
    /**
     * Sets schoolCategory.
     *
     * @param string $schoolCategory
     *
     * @return $this
     */
    public function setSchoolCategory($schoolCategory)
    {
        $this->schoolCategory = $schoolCategory;

        return $this;
    }
    /**
     * Gets schoolCategory.
     *
     * @return string
     */
    public function getSchoolCategory()
    {
        return $this->schoolCategory;
    }
    /**
     * Sets typeEstablishment.
     *
     * @param string $typeEstablishment
     *
     * @return $this
     */
    public function setTypeEstablishment($typeEstablishment)
    {
        $this->typeEstablishment = $typeEstablishment;

        return $this;
    }
    /**
     * Gets typeEstablishment.
     *
     * @return string
     */
    public function getTypeEstablishment()
    {
        return $this->typeEstablishment;
    }
    /**
     * Sets typeEstablishmentDetail.
     *
     * @param string $typeEstablishmentDetail
     *
     * @return $this
     */
    public function setTypeEstablishmentDetail($typeEstablishmentDetail)
    {
        $this->typeEstablishmentDetail = $typeEstablishmentDetail;

        return $this;
    }
    /**
     * Gets typeEstablishmentDetail.
     *
     * @return string
     */
    public function getTypeEstablishmentDetail()
    {
        return $this->typeEstablishmentDetail;
    }
    /**
     * Sets budget.
     *
     * @param float $budget
     *
     * @return $this
     */
    public function setBudget($budget)
    {
        $this->budget = floatval($budget);

        return $this;
    }
    /**
     * Gets budget.
     *
     * @return float
     */
    public function getBudget()
    {
        return $this->budget;
    }
    /**
     * Sets isPedagogicIsPrincipalActivity.
     *
     * @param bool $isPedagogicIsPrincipalActivity
     *
     * @return $this
     */
    public function setIsPedagogicIsPrincipalActivity($isPedagogicIsPrincipalActivity)
    {
        $this->isPedagogicIsPrincipalActivity = $isPedagogicIsPrincipalActivity;

        return $this;
    }
    /**
     * Gets isPedagogicIsPrincipalActivity.
     *
     * @return bool
     */
    public function getIsPedagogicIsPrincipalActivity()
    {
        return $this->isPedagogicIsPrincipalActivity;
    }
    /**
     * Sets pedagogicBudget.
     *
     * @param float $pedagogicBudget
     *
     * @return $this
     */
    public function setPedagogicBudget($pedagogicBudget)
    {
        $this->pedagogicBudget = floatval($pedagogicBudget);

        return $this;
    }
    /**
     * Gets pedagogicBudget.
     *
     * @return float
     */
    public function getPedagogicBudget()
    {
        return $this->pedagogicBudget;
    }
    /**
     * Sets Access.
     *
     * @param Access $contactPerson
     *
     * @return $this
     */
    public function setContactPerson(Access $contactPerson = null)
    {
        $this->contactPerson = $contactPerson;

        return $this;
    }
    /**
     * Gets Access.
     *
     * @return Person
     */
    public function getContactPerson()
    {
        return $this->contactPerson;
    }
    /**
     * Sets isPerformanceContractor.
     *
     * @param bool $isPerformanceContractor
     *
     * @return $this
     */
    public function setIsPerformanceContractor($isPerformanceContractor)
    {
        $this->isPerformanceContractor = $isPerformanceContractor;

        return $this;
    }
    /**
     * Gets isPerformanceContractor.
     *
     * @return bool
     */
    public function getIsPerformanceContractor()
    {
        return $this->isPerformanceContractor;
    }
    /**
     * Sets ffecApproval.
     *
     * @param string $ffecApproval
     *
     * @return $this
     */
    public function setFfecApproval($ffecApproval)
    {
        $this->ffecApproval = $ffecApproval;

        return $this;
    }
    /**
     * Gets ffecApproval.
     *
     * @return string
     */
    public function getFfecApproval()
    {
        return $this->ffecApproval;
    }
    /**
     * Add network
     *
     * @param NetworkOrganization $network
     * @return Organization
     */
    public function addNetwork(NetworkOrganization $network)
    {
        $network->setOrganization($this);
        $this->network[] = $network;

        return $this;
    }
    /**
     * Remove network
     *
     * @param NetworkOrganization $network
     */
    public function removeNetwork(NetworkOrganization $network)
    {
        $this->network->removeElement($network);
    }
    /**
     * Get network
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getNetwork()
    {
        return ($this->network) ? array_values($this->network->toArray()) : new ArrayCollection();
    }
    /**
     * Add networkChild
     *
     * @param NetworkOrganization $networkChild
     * @return Organization
     */
    public function addNetworkChild(NetworkOrganization $networkChild)
    {
        $this->networkChild[] = $networkChild;

        return $this;
    }
    /**
     * Remove network
     *
     * @param NetworkOrganization $networkChild
     */
    public function removeNetworkChild(NetworkOrganization $networkChild)
    {
        $this->networkChild->removeElement($networkChild);
    }
    /**
     * Get network
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getNetworkChild()
    {
        return ($this->networkChild) ? array_values($this->networkChild->toArray()) : new ArrayCollection();
    }
    /**
     * Add organizationAddressPostal
     *
     * @param OrganizationAddressPostal $organizationAddressPostal
     * @return Person
     */
    public function addOrganizationAddressPostal(OrganizationAddressPostal $organizationAddressPostal)
    {
        $organizationAddressPostal->setOrganization($this);
        $this->organizationAddressPostal[] = $organizationAddressPostal;
        return $this;
    }
    /**
     * Remove personAddressPostal
     *
     * @param OrganizationAddressPostal $organizationAddressPostal
     */
    public function removeOrganizationAddressPostal(OrganizationAddressPostal $organizationAddressPostal)
    {
        $this->organizationAddressPostal->removeElement($organizationAddressPostal);
    }
    /**
     * Get OrganizationAddressPostal
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getOrganizationAddressPostal()
    {
        return $this->organizationAddressPostal;
    }
    /**
     * Get OrganizationAddressPostal
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getOrganizationAddressPostalPrincipal()
    {
        $principal = [];
        foreach ($this->organizationAddressPostal as $organizationAddressPostal){
            if($organizationAddressPostal->getType ()  === AddressPostalOrganizationTypeEnum::ADDRESS_HEAD_OFFICE){
                $principal = new ArrayCollection([$organizationAddressPostal]);
            }
        }
        return $principal;
    }
    /**
     * Get OrganizationAddressPostal
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getOrganizationAddressPostalContact()
    {
        $contact = [];
        foreach ($this->organizationAddressPostal as $organizationAddressPostal){
            if($organizationAddressPostal->getType ()  === AddressPostalOrganizationTypeEnum::ADDRESS_CONTACT){
                $contact = new ArrayCollection([$organizationAddressPostal]);
            }
        }
        return $contact;
    }
    /**
     * Get OrganizationAddressPostal
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getOrganizationAddressPostalBill()
    {
        $bill = [];
        foreach ($this->organizationAddressPostal as $organizationAddressPostal){
            if($organizationAddressPostal->getType ()  === AddressPostalOrganizationTypeEnum::ADDRESS_BILL){
                $bill = new ArrayCollection([$organizationAddressPostal]);
            }
        }
        return $bill;
    }
    /**
     * Add contact Point
     *
     * @param ContactPoint $contactPoint
     * @return Person
     */
    public function addContactPoint(ContactPoint $contactPoint)
    {
        $contactPoint->addOrganization($this);
        $this->contactPoint[] = $contactPoint;
        return $this;
    }
    /**
     * Remove contact Point
     *
     * @param ContactPoint $contactPoint
     */
    public function removeContactPoint(ContactPoint $contactPoint)
    {
        $this->contactPoint->removeElement($contactPoint);
    }
    /**
     * Get contact Point
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getContactPoint()
    {
        return $this->contactPoint;
    }
    /**
     * Get contact Point
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getContactPointPrincipal()
    {
        $principal = [];
        foreach ($this->contactPoint as $contactPoint){
            if($contactPoint->getContactType ()  === ContactPointTypeEnum::PRINCIPAL){
                $principal = new ArrayCollection([$contactPoint]);
            }
        }
        return $principal;
    }
    /**
     * Get contact Point
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getContactPointContact()
    {
        $contact = [];
        foreach ($this->contactPoint as $contactPoint){
            if($contactPoint->getContactType ()  === ContactPointTypeEnum::CONTACT){
                $contact = new ArrayCollection([$contactPoint]);
            }
        }
        return $contact;
    }
    /**
     * Get contact Point
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getContactPointBill()
    {
        $bill = [];
        foreach ($this->contactPoint as $contactPoint){
            if($contactPoint->getContactType ()  === ContactPointTypeEnum::BILL){
                $bill = new ArrayCollection([$contactPoint]);
            }
        }
        return $bill;
    }
    /**
     * Add bankAccount
     *
     * @param BankAccount $bankAccount
     * @return Person
     */
    public function addBankAccount(BankAccount $bankAccount)
    {
        $bankAccount->addOrganization($this);
        $this->bankAccount[] = $bankAccount;
        return $this;
    }
    /**
     * Remove bankAccount
     *
     * @param BankAccount $bankAccount
     */
    public function removeBankAccount(BankAccount $bankAccount)
    {
        $this->bankAccount->removeElement($bankAccount);
    }
    /**
     * Get bankAccount
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getBankAccount()
    {
        return $this->bankAccount;
    }
    /**
     * Sets portailVisibility.
     *
     * @param bool $portailVisibility
     *
     * @return $this
     */
    public function setPortailVisibility($portailVisibility)
    {
        $this->portailVisibility = $portailVisibility;

        return $this;
    }
    /**
     * Gets portailVisibility.
     *
     * @return bool
     */
    public function getPortailVisibility()
    {
        return $this->portailVisibility;
    }
    /**
     * Get settings
     *
     * @return \AppBundle\Entity\Organization\Settings
     */
    public function getSettings()
    {
        return $this->settings;
    }
    /**
     * Set settings
     *
     * @return Organization
     */
    public function setSettings(\AppBundle\Entity\Organization\Settings $settings)
    {
        $settings->setOrganization($this);
        $this->settings = $settings;

        return $this;
    }
    /**
     * Get parameters
     *
     * @return \AppBundle\Entity\Organization\Parameters
     */
    public function getParameters()
    {
        return $this->parameters;
    }
    /**
     * Set settings
     * @param Parameters $parameters
     * @return Parameters
     */
    public function setParameters(Parameters $parameters)
    {
        $this->parameters = $parameters;
        return $this;
    }
    /**
     * @param OrganizationHoliday $personHoliday
     * @return $this
     */
    public function addHoliday(OrganizationHoliday $organizationHoliday)
    {
        $organizationHoliday->setOrganization($this);
        $this->holidays->add($organizationHoliday);

        return $this;
    }
    /**
     * @param OrganizationHoliday $organizationHoliday
     * @return $this
     */
    public function removeHoliday(OrganizationHoliday $organizationHoliday)
    {
        $organizationHoliday->setOrganization(null);
        $this->holidays->removeElement($organizationHoliday);

        return $this;
    }
    /**
     * @param array $organizationHolidays
     * @return $this
     */
    public function setHolidays(array $organizationHolidays)
    {
        $this->holidays = $organizationHolidays;

        return $this;
    }
    /**
     * @return ArrayCollection<OrganizationHoliday>
     */
    public function getHolidays()
    {
        return $this->holidays;
    }
    /**
     * Add organizationLicence
     *
     * @param \AppBundle\Entity\Organization\OrganizationLicence $organizationLicence
     *
     * @return Organization
     */
    public function addOrganizationLicence(\AppBundle\Entity\Organization\OrganizationLicence $organizationLicence)
    {
        $organizationLicence->setOrganization($this);
        $this->organizationLicences[] = $organizationLicence;

        return $this;
    }
    /**
     * Remove organizationLicence
     *
     * @param \AppBundle\Entity\Organization\OrganizationLicence $organizationLicence
     */
    public function removeOrganizationLicence(\AppBundle\Entity\Organization\OrganizationLicence $organizationLicence)
    {
        $this->organizationLicences->removeElement($organizationLicence);
    }
    /**
     * Get organizationLicences
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getOrganizationLicences()
    {
        return $this->organizationLicences;
    }
    /**
     * Set billingSetting
     *
     * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
     *
     * @return Organization
     */
    public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting = null)
    {
//        if($billingSetting === null){
//            $billingSetting = new BillingSetting();
//            $billingSetting->setOrganization($this);
//        }
        $this->billingSetting = $billingSetting;

        return $this;
    }
    /**
     * Get billingSetting
     *
     * @return \AppBundle\Entity\Billing\BillingSetting
     */
    public function getBillingSetting()
    {
        return $this->billingSetting;
    }
    /**
     * Set billingExportSetting
     *
     * @param \AppBundle\Entity\Billing\BillingExportSetting $billingExportSetting
     *
     * @return Organization
     */
    public function setBillingExportSetting(\AppBundle\Entity\Billing\BillingExportSetting $billingExportSetting = null)
    {
        if (!is_null($billingExportSetting)) {
            $billingExportSetting->setOrganization($this);
        }
        $this->billingExportSetting = $billingExportSetting;

        return $this;
    }
    /**
     * Get billingExportSetting
     *
     * @return \AppBundle\Entity\Billing\BillingExportSetting
     */
    public function getBillingExportSetting()
    {
        return $this->billingExportSetting;
    }
    /**
     * Add course
     *
     * @param \AppBundle\Entity\Booking\Course $course
     *
     * @return Organization
     */
    public function addCourse(\AppBundle\Entity\Booking\Course $course)
    {
        $course->setOrganization($this);
        $this->courses[] = $course;

        return $this;
    }
    /**
     * Remove course
     *
     * @param \AppBundle\Entity\Booking\Course $course
     */
    public function removeCourse(\AppBundle\Entity\Booking\Course $course)
    {
        $this->courses->removeElement($course);
    }
    /**
     * Get courses
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCourses()
    {
        return $this->courses;
    }
    /**
     * Add educationalProject
     *
     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
     *
     * @return Organization
     */
    public function addEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
    {
        $educationalProject->setOrganization($this);
        $this->educationalProjects[] = $educationalProject;

        return $this;
    }
    /**
     * Remove educationalProject
     *
     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
     */
    public function removeEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
    {
        $this->educationalProjects->removeElement($educationalProject);
    }
    /**
     * Get educationalProjects
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getEducationalProjects()
    {
        return $this->educationalProjects;
    }
    /**
     * Add event
     *
     * @param \AppBundle\Entity\Booking\Event $event
     *
     * @return Organization
     */
    public function addEvent(\AppBundle\Entity\Booking\Event $event)
    {
        $event->setOrganization($this);
        $this->events[] = $event;

        return $this;
    }
    /**
     * Remove event
     *
     * @param \AppBundle\Entity\Booking\Event $event
     */
    public function removeEvent(\AppBundle\Entity\Booking\Event $event)
    {
        $this->events->removeElement($event);
    }
    /**
     * Get events
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getEvents()
    {
        return $this->events;
    }
    /**
     * Add examen
     *
     * @param \AppBundle\Entity\Booking\Examen $examen
     *
     * @return Organization
     */
    public function addExamen(\AppBundle\Entity\Booking\Examen $examen)
    {
        $examen->setOrganization($this);
        $this->examens[] = $examen;

        return $this;
    }
    /**
     * Remove examen
     *
     * @param \AppBundle\Entity\Booking\Examen $examen
     */
    public function removeExamen(\AppBundle\Entity\Booking\Examen $examen)
    {
        $this->examens->removeElement($examen);
    }
    /**
     * Get examens
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getExamens()
    {
        return $this->examens;
    }
    /**
     * Add critereNotation
     *
     * @param \AppBundle\Entity\Education\CriteriaNotation $critereNotation
     *
     * @return Organization
     */
    public function addCritereNotation(\AppBundle\Entity\Education\CriteriaNotation $critereNotation)
    {
        $critereNotation->setOrganization($this);
        $this->critereNotations[] = $critereNotation;

        return $this;
    }
    /**
     * Remove critereNotation
     *
     * @param \AppBundle\Entity\Education\CriteriaNotation $critereNotation
     */
    public function removeCritereNotation(\AppBundle\Entity\Education\CriteriaNotation $critereNotation)
    {
        $this->critereNotations->removeElement($critereNotation);
    }
    /**
     * Get critereNotations
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCritereNotations()
    {
        return $this->critereNotations;
    }
    /**
     * Add cycle
     *
     * @param \AppBundle\Entity\Education\Cycle $cycle
     *
     * @return Organization
     */
    public function addCycle(\AppBundle\Entity\Education\Cycle $cycle)
    {
        $cycle->setOrganization($this);
        $this->cycles[] = $cycle;

        return $this;
    }
    /**
     * Remove cycle
     *
     * @param \AppBundle\Entity\Education\Cycle $cycle
     */
    public function removeCycle(\AppBundle\Entity\Education\Cycle $cycle)
    {
        $this->cycles->removeElement($cycle);
    }
    /**
     * Get cycles
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCycles()
    {
        return $this->cycles;
    }
    /**
     * Add EducationTiming
     *
     * @param \AppBundle\Entity\Education\EducationTiming $educationTiming
     *
     * @return Organization
     */
    public function addEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming)
    {
        $educationTiming->setOrganization($this);
        $this->educationTimings[] = $educationTiming;

        return $this;
    }
    /**
     * Remove EducationTiming
     *
     * @param \AppBundle\Entity\Education\EducationTiming $educationTiming
     */
    public function removeEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming)
    {
        $this->educationTimings->removeElement($educationTiming);
    }
    /**
     * Get EducationTimings
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getEducationTimings()
    {
        return $this->educationTimings;
    }
    /**
     * Add educationCategory
     *
     * @param \AppBundle\Entity\Education\EducationCategory $educationCategory
     *
     * @return Organization
     */
    public function addEducationCategory(\AppBundle\Entity\Education\EducationCategory $educationCategory)
    {
        $educationCategory->setOrganization($this);
        $this->educationCategories[] = $educationCategory;

        return $this;
    }
    /**
     * Remove educationCategory
     *
     * @param \AppBundle\Entity\Education\EducationCategory $educationCategory
     */
    public function removeEducationCategory(\AppBundle\Entity\Education\EducationCategory $educationCategory)
    {
        $this->educationCategories->removeElement($educationCategory);
    }
    /**
     * Get educationCategories
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getEducationCategories()
    {
        return $this->educationCategories;
    }
    /**
     * Add periodNotation
     *
     * @param \AppBundle\Entity\Education\PeriodNotation $periodNotation
     *
     * @return Organization
     */
    public function addPeriodNotation(\AppBundle\Entity\Education\PeriodNotation $periodNotation)
    {
        $periodNotation->setOrganization($this);
        $this->periodNotations[] = $periodNotation;

        return $this;
    }
    /**
     * Remove periodNotation
     *
     * @param \AppBundle\Entity\Education\PeriodNotation $periodNotation
     */
    public function removePeriodNotation(\AppBundle\Entity\Education\PeriodNotation $periodNotation)
    {
        $this->periodNotations->removeElement($periodNotation);
    }
    /**
     * Get periodNotations
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPeriodNotations()
    {
        return $this->periodNotations;
    }
    /**
     * Add document
     *
     * @param \AppBundle\Entity\Core\Document $document
     *
     * @return Organization
     */
    public function addDocument(\AppBundle\Entity\Core\Document $document)
    {
        $document->setOrganization($this);
        $this->documents[] = $document;

        return $this;
    }
    /**
     * Remove document
     *
     * @param \AppBundle\Entity\Core\Document $document
     */
    public function removeDocument(\AppBundle\Entity\Core\Document $document)
    {
        $this->documents->removeElement($document);
    }
    /**
     * Get documents
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getDocuments()
    {
        return $this->documents;
    }
    /**
     * Add file
     *
     * @param \AppBundle\Entity\Core\File $file
     *
     * @return Organization
     */
    public function addFile(\AppBundle\Entity\Core\File $file)
    {
        $file->setOrganization($this);
        $this->files[] = $file;

        return $this;
    }
    /**
     * Remove file
     *
     * @param \AppBundle\Entity\Core\File $file
     */
    public function removeFile(\AppBundle\Entity\Core\File $file)
    {
        $this->files->removeElement($file);
    }
    /**
     * Get files
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getFiles()
    {
        return $this->files;
    }
    /**
     * Add notification
     *
     * @param \AppBundle\Entity\Core\Notification $notification
     *
     * @return Organization
     */
    public function addNotification(\AppBundle\Entity\Core\Notification $notification)
    {
        $notification->setRecipientOrganization($this);
        $this->notifications[] = $notification;

        return $this;
    }
    /**
     * Remove notification
     *
     * @param \AppBundle\Entity\Core\Notification $notification
     */
    public function removeNotification(\AppBundle\Entity\Core\Notification $notification)
    {
        $this->notifications->removeElement($notification);
    }
    /**
     * Get notifications
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getNotifications()
    {
        return $this->notifications;
    }
    /**
     * Add message
     *
     * @param \AppBundle\Entity\Message\Message $message
     *
     * @return Organization
     */
    public function addMessage(\AppBundle\Entity\Message\Message $message)
    {
        $message->setOrganization($this);
        $this->messages[] = $message;

        return $this;
    }
    /**
     * Remove message
     *
     * @param \AppBundle\Entity\Message\Message $message
     */
    public function removeMessage(\AppBundle\Entity\Message\Message $message)
    {
        $this->messages->removeElement($message);
    }
    /**
     * Get messages
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getMessages()
    {
        return $this->messages;
    }
    /**
     * Add activity
     *
     * @param \AppBundle\Entity\Organization\Activity $activity
     *
     * @return Organization
     */
    public function addActivity(\AppBundle\Entity\Organization\Activity $activity)
    {
        $activity->setOrganization($this);
        $this->activities[] = $activity;

        return $this;
    }
    /**
     * Remove activity
     *
     * @param \AppBundle\Entity\Organization\Activity $activity
     */
    public function removeActivity(\AppBundle\Entity\Organization\Activity $activity)
    {
        $this->activities->removeElement($activity);
    }
    /**
     * Get activities
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getActivities()
    {
        return $this->activities;
    }
    /**
     * Add jury
     *
     * @param \AppBundle\Entity\Organization\Jury $jury
     *
     * @return Organization
     */
    public function addJury(\AppBundle\Entity\Organization\Jury $jury)
    {
        $jury->setOrganization($this);
        $this->juries[] = $jury;

        return $this;
    }
    /**
     * Remove jury
     *
     * @param \AppBundle\Entity\Organization\Jury $jury
     */
    public function removeJury(\AppBundle\Entity\Organization\Jury $jury)
    {
        $this->juries->removeElement($jury);
    }
    /**
     * Get juries
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getJuries()
    {
        return $this->juries;
    }
    /**
     * Add commission
     *
     * @param \AppBundle\Entity\Person\Commission $commission
     *
     * @return Organization
     */
    public function addCommission(\AppBundle\Entity\Person\Commission $commission)
    {
        $commission->setOrganization($this);
        $this->commissions[] = $commission;

        return $this;
    }
    /**
     * Remove commission
     *
     * @param \AppBundle\Entity\Person\Commission $commission
     */
    public function removeCommission(\AppBundle\Entity\Person\Commission $commission)
    {
        $this->commissions->removeElement($commission);
    }
    /**
     * Get commissions
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCommissions()
    {
        return $this->commissions;
    }
    /**
     * Add place
     *
     * @param \AppBundle\Entity\Place\Place $place
     *
     * @return Organization
     */
    public function addPlace(\AppBundle\Entity\Place\Place $place)
    {
        $place->setOrganization($this);
        $this->places[] = $place;

        return $this;
    }
    /**
     * Remove place
     *
     * @param \AppBundle\Entity\Place\Place $place
     */
    public function removePlace(\AppBundle\Entity\Place\Place $place)
    {
        $this->places->removeElement($place);
    }
    /**
     * Get places
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getPlaces()
    {
        return $this->places;
    }
    /**
     * Add attendance
     *
     * @param \AppBundle\Entity\Booking\Attendance $attendence
     *
     * @return Organization
     */
    public function addAttendance(\AppBundle\Entity\Booking\Attendance $attendance)
    {
        $attendance->setOrganization($this);
        $this->attendances[] = $attendance;

        return $this;
    }
    /**
     * Remove attendance
     *
     * @param \AppBundle\Entity\Booking\Attendance $attendance
     */
    public function removeAttendance(\AppBundle\Entity\Booking\Attendance $attendance)
    {
        $this->attendances->removeElement($attendance);
    }
    /**
     * Get attendances
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getAttendances()
    {
        return $this->attendances;
    }
    /**
     * Add equipment
     *
     * @param \AppBundle\Entity\Product\Equipment $equipment
     *
     * @return Organization
     */
    public function addEquipment(\AppBundle\Entity\Product\Equipment $equipment)
    {
        $equipment->setOrganization($this);
        $this->equipments[] = $equipment;

        return $this;
    }
    /**
     * Remove equipment
     *
     * @param \AppBundle\Entity\Product\Equipment $equipment
     */
    public function removeEquipment(\AppBundle\Entity\Product\Equipment $equipment)
    {
        $this->equipments->removeElement($equipment);
    }
    /**
     * Get equipments
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getEquipments()
    {
        return $this->equipments;
    }
    /**
     * Add intangible
     *
     * @param \AppBundle\Entity\Product\Intangible $intangible
     *
     * @return Organization
     */
    public function addIntangible(\AppBundle\Entity\Product\Intangible $intangible)
    {
        $intangible->setOrganization($this);
        $this->intangibles[] = $intangible;

        return $this;
    }
    /**
     * Remove intangible
     *
     * @param \AppBundle\Entity\Product\Intangible $intangible
     */
    public function removeIntangible(\AppBundle\Entity\Product\Intangible $intangible)
    {
        $this->intangibles->removeElement($intangible);
    }
    /**
     * Get intangibles
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getIntangibles()
    {
        return $this->intangibles;
    }
    public function checkIfFFEC()
    {
        $isFFEC = false;
        $networksOrganizations = $this->getNetwork();
        foreach ($networksOrganizations as $netOrga) {
            if ('FFEC' === $netOrga->getNetwork()->getName()) {
                $isFFEC = true;
                break;
            }
        }
        return $isFFEC;
    }
    /**
     * Get the cms Id
     *
     * @return int
     */
    public function getCmsId()
    {
        return $this->cmsId;
    }
    /**
     * Sets the cms Id
     *
     * @param int $cmsId
     * @return $this
     */
    public function setCmsId($cmsId)
    {
        $this->cmsId = $cmsId;
        return $this;
    }
    /**
     * Get children
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getHasChildren()
    {
        return count($this->networkChild) > 0;
    }
    /**
     * Gets seniority.
     *
     * @return int
     */
    public function getEmailAdminAccess()
    {
        $email = null;

        $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
        $adminAccess = $this->getAccess()->matching($criteria);

        if (!empty($adminAccess) && !is_null($adminAccess[0])) {
            $adminAccess = $adminAccess[0];
            $principalContactPoint = $adminAccess->getPerson()->getContactPointPrincipal();
            if (!empty($principalContactPoint))
                $email = $principalContactPoint->getEmail();
        }

        return $email;
    }
    /**
     * Sets email.
     *
     * @param string $email
     *
     * @return $this
     */
    public function setEmailAdminAccess($email)
    {
        $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
        $adminAccess = $this->getAccess()->matching($criteria);

        if (!empty($adminAccess) && !is_null($adminAccess[0])) {
            $adminAccess = $adminAccess[0];
            $principalContactPoint = $adminAccess->getPerson()->getContactPointPrincipal();

            if (empty($principalContactPoint)){
                $principalContactPoint = new ContactPoint();
                $principalContactPoint->setContactType(ContactPointTypeEnum::PRINCIPAL);
                $adminAccess->getPerson()->addContactPoint($principalContactPoint);
            }

            $principalContactPoint->setEmail($email);
        }

        return $this;
    }
    /**
     * Gets seniority.
     *
     * @return int
     */
    public function getLoginAdminAccess()
    {
        $email = null;

        $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
        $adminAccess = $this->getAccess()->matching($criteria);

        if (!empty($adminAccess) && !is_null($adminAccess[0])) {
            $adminAccess = $adminAccess[0];
            $login = $adminAccess->getPerson()->getUsername();
        }

        return $login;
    }
    /**
     * Gets seniority.
     *
     * @return int
     */
    public function getIdAdminAccess()
    {
        $idAdminAccess = null;

        $criteria = Criteria::create()->where(Criteria::expr()->eq("adminAccess", true));
        $adminAccess = $this->getAccess()->matching($criteria);

        if (!empty($adminAccess) && !is_null($adminAccess[0])) {
            $adminAccess = $adminAccess[0];
            $idAdminAccess = $adminAccess->getId();
        }

        return $idAdminAccess;
    }
    /**
     *
     * {@inheritdoc}
     */
    public function getContact()
    {
        return $this;
    }
    /**
     *
     * {@inheritdoc}
     */
    public function getContactAddress()
    {
        return $this->getAddressPostalForType(\AppBundle\Enum\Core\AddressPostalOrganizationTypeEnum::ADDRESS_HEAD_OFFICE);
    }
    /**
     *
     * {@inheritdoc}
     */
    public function getContactName()
    {
        return $this->getName();
    }
    /**
     *
     * {@inheritdoc}
     */
    public function getContactContactPoint()
    {
        return $this->getContactPointForType(ContactPointTypeEnum::PRINCIPAL);
    }
    /**
     * Add access
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $access
     *
     * @return access
     */
    public function addAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
    {
        $access->setOrganization($this);
        $this->access[] = $access;

        return $this;
    }
    /**
     * Remove access
     *
     * @param \AppBundle\Entity\Organization\Organization $access
     */
    public function removeAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
    {
        $this->access->removeElement($access);
    }
    /**
     * Get access
     *
     * @return access
     */
    public function getAccess()
    {
        return $this->access;
    }
    /**
     * Set access
     *
     * @param array $access
     * @return $this
     */
    public function setAccess(array $accesses)
    {
        foreach ($accesses as $access) {
            $access->setOrganization($this);
        }
        $this->access = new ArrayCollection($accesses);
        return $this;
    }
    /**
     * Set onlineRegistrationSettings
     *
     * @param \AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettings
     *
     * @return Organization
     */
    public function setOnlineRegistrationSettings(\AppBundle\Entity\Organization\OnlineRegistrationSettings $onlineRegistrationSettings = null)
    {
        $onlineRegistrationSettings->setOrganization($this);
        $this->onlineRegistrationSettings = $onlineRegistrationSettings;

        return $this;
    }
    /**
     * Get onlineRegistrationSettings
     *
     * @return \AppBundle\Entity\Organization\OnlineRegistrationSettings
     */
    public function getOnlineRegistrationSettings()
    {
        return $this->onlineRegistrationSettings;
    }
    /**
     * Add cotisationByYear
     *
     * @param \AppBundle\Entity\Organization\CotisationByYear $cotisationByYear
     *
     * @return Organization
     */
    public function addCotisationByYear(\AppBundle\Entity\Organization\CotisationByYear $cotisationByYear)
    {
        $cotisationByYear->setOrganization($this);
        $this->cotisationByYears[] = $cotisationByYear;

        return $this;
    }
    /**
     * Remove cotisationByYear
     *
     * @param \AppBundle\Entity\Organization\CotisationByYear $cotisationByYear
     */
    public function removeCotisationByYear(\AppBundle\Entity\Organization\CotisationByYear $cotisationByYear)
    {
        $this->cotisationByYears->removeElement($cotisationByYear);
    }
    /**
     * Get cotisationByYears
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCotisationByYears()
    {
        return $this->cotisationByYears;
    }
    /**
     * @return string
     */
    public function getTemporaryFieldForCMF()
    {
        return $this->temporaryFieldForCMF;
    }
    /**
     * @param string $temporaryFieldForCMF
     */
    public function setTemporaryFieldForCMF(string $temporaryFieldForCMF)
    {
        $this->temporaryFieldForCMF = $temporaryFieldForCMF;

        return $this;
    }
    /**
     * Add typeOfPractice
     *
     * @param TypeOfPractice $typeOfPractices
     *
     * @return Organization
     */
    public function addTypeOfPractice(TypeOfPractice $typeOfPractices)
    {
        $this->typeOfPractices[] = $typeOfPractices;
        return $this;
    }
    /**
     * Remove typeOfPractice
     *
     * @param TypeOfPractice $typeOfPractices
     */
    public function removeTypeOfPractice(TypeOfPractice $typeOfPractices)
    {
        $this->typeOfPractices->removeElement($typeOfPractices);
    }
    /**
     * Get typeOfPractices
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getTypeOfPractices()
    {
        return $this->typeOfPractices;
    }
    /**
     * Set otherPractice
     *
     * @param string $otherPractice
     *
     * @return Organization
     */
    public function setOtherPractice($otherPractice)
    {
        $this->otherPractice = $otherPractice;

        return $this;
    }
    /**
     * Get otherPractice
     *
     * @return string
     */
    public function getOtherPractice()
    {
        return $this->otherPractice;
    }
    /**
     * Add tag
     *
     * @param \AppBundle\Entity\Core\Tagg $tag
     *
     * @return Organization
     */
    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
    {
        $this->tags[] = $tag;

        return $this;
    }
    /**
     * Remove tag
     *
     * @param \AppBundle\Entity\Core\Tagg $tag
     */
    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
    {
        $this->tags->removeElement($tag);
    }
    /**
     * Get tags
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getTags()
    {
        return $this->tags;
    }
    /**
     * Set youtube
     *
     * @param string $youtube
     *
     * @return Organization
     */
    public function setYoutube($youtube)
    {
        $this->youtube = $youtube;

        return $this;
    }
    /**
     * Get youtube
     *
     * @return string
     */
    public function getYoutube()
    {
        return $this->youtube;
    }
    /**
     * Add organizationArticle
     *
     * @param \AppBundle\Entity\Organization\OrganizationArticle $organizationArticle
     *
     * @return Organization
     */
    public function addOrganizationArticle(\AppBundle\Entity\Organization\OrganizationArticle $organizationArticle)
    {
        $organizationArticle->setOrganization($this);
        $this->organizationArticles[] = $organizationArticle;

        return $this;
    }
    /**
     * Remove organizationArticle
     *
     * @param \AppBundle\Entity\Organization\OrganizationArticle $organizationArticle
     */
    public function removeOrganizationArticle(\AppBundle\Entity\Organization\OrganizationArticle $organizationArticle)
    {
        $this->organizationArticles->removeElement($organizationArticle);
    }
    /**
     * Get organizationArticles
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getOrganizationArticles()
    {
        return $this->organizationArticles;
    }
}
