src/Entity/Vetoadom/Secteur.php line 35

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Vetoadom;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. /**
  9.  * Secteur
  10.  *
  11.  * @ORM\Table(name="secteur", uniqueConstraints={@ORM\UniqueConstraint(name="nom_raccourci", columns={"nom_raccourci"}), @ORM\UniqueConstraint(name="nom_short", columns={"nom_short"}), @ORM\UniqueConstraint(name="nom", columns={"nom"})}, indexes={@ORM\Index(name="FK_secteur_langue2", columns={"langue2_id"}), @ORM\Index(name="FK_secteur_fonctionnement", columns={"fonctionnement_id"}), @ORM\Index(name="FK_secteur_langue1", columns={"langue1_id"}), @ORM\Index(name="FK_secteur_secteur_delai_defaut", columns={"secteur_delai_defaut_id"}), @ORM\Index(name="FK_secteur_referant", columns={"referant_id"})})
  12.  * @ORM\Entity(repositoryClass="App\Repository\Vetoadom\SecteurRepository")
  13.  * @UniqueEntity(
  14.  *    groups={"nom"},
  15.  *    fields={"nom"},
  16.  *    errorPath="nom",
  17.  *    message="page_admin_params_secteur.secteur_nom_exist"
  18.  * )
  19.  * @UniqueEntity(
  20.  *    groups={"nomRaccourci"},
  21.  *    fields={"nomRaccourci"},
  22.  *    errorPath="nomRaccourci",
  23.  *    message="page_admin_params_secteur.secteur_nom_raccourci_exist"
  24.  * )
  25.  * @UniqueEntity(
  26.  *    groups={"nomShort"},
  27.  *    fields={"nomShort"},
  28.  *    errorPath="nomShort",
  29.  *    message="page_admin_params_secteur.secteur_nom_short_exist"
  30.  * )
  31.  */
  32. class Secteur
  33. {
  34.     /**
  35.      * @var int
  36.      *
  37.      * @ORM\Column(name="id", type="integer", nullable=false)
  38.      * @ORM\Id
  39.      * @ORM\GeneratedValue(strategy="IDENTITY")
  40.      */
  41.     private $id;
  42.     /**
  43.      * @var int|null
  44.      *
  45.      * @ORM\Column(name="site_id", type="integer", nullable=true)
  46.      */
  47.     private $siteId;
  48.     /**
  49.      * @var string
  50.      *
  51.      * @ORM\Column(name="nom", type="string", length=190, nullable=false)
  52.      * @Assert\NotBlank(
  53.      *     groups={"nom"},
  54.      *     message="common.blank"
  55.      *  )
  56.      * @Assert\Length(
  57.      *     groups={"nom"},
  58.      *     max=190,
  59.      *     maxMessage="common.too_long"
  60.      *  )
  61.      */
  62.     private $nom;
  63.     /**
  64.      * @var string|null
  65.      *
  66.      * @ORM\Column(name="nom_raccourci", type="string", length=50, nullable=true)
  67.      * @Assert\NotBlank(
  68.      *     groups={"nomRaccourci"},
  69.      *     message="common.blank"
  70.      *  )
  71.      * @Assert\Length(
  72.      *     groups={"nomRaccourci"},
  73.      *     max=50,
  74.      *     maxMessage="common.too_long"
  75.      *  )
  76.      */
  77.     private $nomRaccourci;
  78.     /**
  79.      * @var string|null
  80.      *
  81.      * @ORM\Column(name="nom_short", type="string", length=30, nullable=true)
  82.      * @Assert\NotBlank(
  83.      *     groups={"nomShort"},
  84.      *     message="common.blank"
  85.      *  )
  86.      * @Assert\Length(
  87.      *     groups={"nomShort"},
  88.      *     max=50,
  89.      *     maxMessage="common.too_long"
  90.      *  )
  91.      */
  92.     private $nomShort;
  93.     /**
  94.      * @var string
  95.      *
  96.      * @ORM\Column(name="email_from", type="string", length=75, nullable=false)
  97.      * @Assert\NotBlank(
  98.      *     groups={"emailFrom"},
  99.      *     message="common.blank"
  100.      *  )
  101.      * @Assert\Email(
  102.      *     groups={"emailFrom"},
  103.      *     message="common.email"
  104.      *  )
  105.      */
  106.     private $emailFrom;
  107.     /**
  108.      * @var string|null
  109.      *
  110.      * @ORM\Column(name="email_to_test", type="string", length=75, nullable=true)
  111.      * @Assert\Email(
  112.      *      groups={"emailToTest"},
  113.      *      message="common.email"
  114.      *   )
  115.      */
  116.     private $emailToTest;
  117.     /**
  118.      * @var string|null
  119.      *
  120.      * @ORM\Column(name="couleur", type="string", length=7, nullable=true, options={"fixed"=true})
  121.      * @Assert\NotBlank(
  122.      *     groups={"couleur"},
  123.      *     message="common.blank"
  124.      *  )
  125.      */
  126.     private $couleur;
  127.     /**
  128.      * @var int|null
  129.      *
  130.      * @ORM\Column(name="ordre", type="smallint", nullable=false, options={"unsigned"=true})
  131.      * @Assert\NotBlank(
  132.      *      groups={"ordre"},
  133.      *      message="common.blank"
  134.      *   )
  135.      */
  136.     private $ordre '0';
  137.     /**
  138.      * @var int|null
  139.      *
  140.      * @ORM\Column(name="planning1_id", type="integer", nullable=true)
  141.      * @Assert\NotBlank(
  142.      *     groups={"planning1Id"},
  143.      *     message="common.blank"
  144.      *  )
  145.      */
  146.     private $planning1Id;
  147.     /**
  148.      * @var int|null
  149.      *
  150.      * @ORM\Column(name="planning2_id", type="integer", nullable=true)
  151.      * @Assert\NotBlank(
  152.      *     groups={"planning2Id"},
  153.      *     message="common.blank"
  154.      *  )
  155.      */
  156.     private $planning2Id;
  157.     /**
  158.      * @var int|null
  159.      *
  160.      * @ORM\Column(name="supervision_planning_id", type="integer", nullable=true)
  161.      * @Assert\NotBlank(
  162.      *     groups={"supervisionPlanningId"},
  163.      *     message="common.blank"
  164.      *  )
  165.      */
  166.     private $supervisionPlanningId;
  167.     /**
  168.      * @var int|null
  169.      *
  170.      * @ORM\Column(name="vetcoach_planning_id", type="integer", nullable=true)
  171.      * @Assert\NotBlank(
  172.      *     groups={"vetcoachPlanningId"},
  173.      *     message="common.blank"
  174.      *  )
  175.      */
  176.     private $vetcoachPlanningId;
  177.     /**
  178.      * @var int|null
  179.      *
  180.      * @ORM\Column(name="asv_planning_id", type="integer", nullable=true)
  181.      * @Assert\NotBlank(
  182.      *     groups={"asvPlanningId"},
  183.      *     message="common.blank"
  184.      *  )
  185.      */
  186.     private $asvPlanningId;
  187.     /**
  188.      * @var int|null
  189.      *
  190.      * @ORM\Column(name="astreinte_chirurgie_planning_id", type="integer", nullable=true)
  191.      * @Assert\NotBlank(
  192.      *     groups={"astreinteChirurgiePlanningId"},
  193.      *     message="common.blank"
  194.      *  )
  195.      */
  196.     private $astreinteChirurgiePlanningId;
  197.     /**
  198.      * @var string|null
  199.      *
  200.      * @ORM\Column(name="adresse1", type="string", length=38, nullable=true)
  201.      * @Assert\NotBlank(
  202.      *     groups={"adresse1"},
  203.      *     message="common.blank"
  204.      *  )
  205.      * @Assert\Length(
  206.      *      groups={"adresse1"},
  207.      *      max=38,
  208.      *      maxMessage="common.too_long"
  209.      *   )
  210.      */
  211.     private $adresse1;
  212.     /**
  213.      * @var string|null
  214.      *
  215.      * @ORM\Column(name="adresse2", type="string", length=38, nullable=true)
  216.      * @Assert\Length(
  217.      *       groups={"adresse2"},
  218.      *       max=38,
  219.      *       maxMessage="common.too_long"
  220.      *    )
  221.      */
  222.     private $adresse2;
  223.     /**
  224.      * @var \Ville
  225.      *
  226.      * @ORM\ManyToOne(targetEntity="Ville")
  227.      * @ORM\JoinColumns({
  228.      *    @ORM\JoinColumn(name="ville_id", referencedColumnName="id")
  229.      *  })
  230.      * @Assert\NotBlank(
  231.      *      groups={"ville"},
  232.      *      message="common.blank"
  233.      *   )
  234.      */
  235.     private $ville;
  236.     /**
  237.      * @var string|null
  238.      *
  239.      * @ORM\Column(name="texte_mono_langue1", type="text", length=65535, nullable=true)
  240.      * @Assert\NotBlank(
  241.      *      groups={"texteMonoLangue1"},
  242.      *      message="common.blank"
  243.      *   )
  244.      */
  245.     private $texteMonoLangue1;
  246.     /**
  247.      * @var string|null
  248.      *
  249.      * @ORM\Column(name="texte_mono_langue2", type="text", length=65535, nullable=true)
  250.      * @Assert\NotBlank(
  251.      *      groups={"texteMonoLangue2"},
  252.      *      message="common.blank"
  253.      *   )
  254.      */
  255.     private $texteMonoLangue2;
  256.     /**
  257.      * @var string|null
  258.      *
  259.      * @ORM\Column(name="texte_multi_langue1", type="text", length=65535, nullable=true)
  260.      * @Assert\NotBlank(
  261.      *      groups={"texteMultiLangue1"},
  262.      *      message="common.blank"
  263.      *   )
  264.      */
  265.     private $texteMultiLangue1;
  266.     /**
  267.      * @var string|null
  268.      *
  269.      * @ORM\Column(name="texte_multi_langue2", type="text", length=65535, nullable=true)
  270.      * @Assert\NotBlank(
  271.      *      groups={"texteMultiLangue2"},
  272.      *      message="common.blank"
  273.      *   )
  274.      */
  275.     private $texteMultiLangue2;
  276.     /**
  277.      * @var string|null
  278.      *
  279.      * @ORM\Column(name="texte_sans_langue1", type="text", length=65535, nullable=true)
  280.      * @Assert\NotBlank(
  281.      *      groups={"texteSansLangue1"},
  282.      *      message="common.blank"
  283.      *   )
  284.      */
  285.     private $texteSansLangue1;
  286.     /**
  287.      * @var string|null
  288.      *
  289.      * @ORM\Column(name="texte_sans_langue2", type="text", length=65535, nullable=true)
  290.      * @Assert\NotBlank(
  291.      *      groups={"texteSansLangue2"},
  292.      *      message="common.blank"
  293.      *   )
  294.      */
  295.     private $texteSansLangue2;
  296.     /**
  297.      * @var string|null
  298.      *
  299.      * @ORM\Column(name="coeff_feux", type="string", precision=10, scale=2, nullable=true, options={"unsigned"=true})
  300.      * @Assert\NotBlank(
  301.      *       groups={"coeffFeux"},
  302.      *       message="common.blank"
  303.      *    )
  304.      */
  305.     private $coeffFeux;
  306.     /**
  307.      * @var string|null
  308.      *
  309.      * @ORM\Column(name="lien_externe_message", type="string", length=180, nullable=true)
  310.      * @Assert\NotBlank(
  311.      *      groups={"lienExterneMessage"},
  312.      *      message="common.blank"
  313.      *   )
  314.      * @Assert\Length(
  315.      *      groups={"lienExterneMessage"},
  316.      *      max=180,
  317.      *      maxMessage="common.too_long"
  318.      *   )
  319.      */
  320.     private $lienExterneMessage;
  321.     /**
  322.      * @var string|null
  323.      *
  324.      * @ORM\Column(name="lien_externe_prise_appel", type="string", length=180, nullable=true)
  325.      * @Assert\NotBlank(
  326.      *      groups={"lienExternePriseAppel"},
  327.      *      message="common.blank"
  328.      *   )
  329.      * @Assert\Length(
  330.      *      groups={"lienExternePriseAppel"},
  331.      *      max=180,
  332.      *      maxMessage="common.too_long"
  333.      *   )
  334.      */
  335.     private $lienExternePriseAppel;
  336.     /**
  337.      * @var string|null
  338.      *
  339.      * @ORM\Column(name="lien_externe_veterinaire_planning", type="string", length=180, nullable=true)
  340.      * @Assert\NotBlank(
  341.      *      groups={"lienExterneVeterinairePlanning"},
  342.      *      message="common.blank"
  343.      *   )
  344.      * @Assert\Length(
  345.      *      groups={"lienExterneVeterinairePlanning"},
  346.      *      max=180,
  347.      *      maxMessage="common.too_long"
  348.      *   )
  349.      */
  350.     private $lienExterneVeterinairePlanning;
  351.     /**
  352.      * @var string|null
  353.      *
  354.      * @ORM\Column(name="url_root", type="string", length=180, nullable=true)
  355.      * @Assert\NotBlank(
  356.      *      groups={"urlRoot"},
  357.      *      message="common.blank"
  358.      *   )
  359.      * @Assert\Length(
  360.      *      groups={"urlRoot"},
  361.      *      max=180,
  362.      *      maxMessage="common.too_long"
  363.      *   )
  364.      */
  365.     private $urlRoot;
  366.     /**
  367.      * @var string|null
  368.      *
  369.      * @ORM\Column(name="email_manager_service_regulation", type="string", length=75, nullable=true)
  370.      * @Assert\NotBlank(
  371.      *      groups={"emailManagerServiceRegulation"},
  372.      *      message="common.blank"
  373.      *   )
  374.      * @Assert\Email(
  375.      *      groups={"emailManagerServiceRegulation"},
  376.      *      message="common.email"
  377.      *   )
  378.      */
  379.     private $emailManagerServiceRegulation;
  380.     /**
  381.      * @var string|null
  382.      *
  383.      * @ORM\Column(name="content_estimatif_tarifs", type="text", length=65535, nullable=true)
  384.      * @Assert\NotBlank(
  385.      *      groups={"contentEstimatifTarifs"},
  386.      *      message="common.blank"
  387.      *   )
  388.      */
  389.     private $contentEstimatifTarifs;
  390.     /**
  391.      * @var string|null
  392.      *
  393.      * @ORM\Column(name="content_infos_secteur", type="text", length=65535, nullable=true)
  394.      * @Assert\NotBlank(
  395.      *      groups={"contentInfosSecteur"},
  396.      *      message="common.blank"
  397.      *   )
  398.      */
  399.     private $contentInfosSecteur;
  400.     /**
  401.      * @var string|null
  402.      *
  403.      * @ORM\Column(name="content_infos_admin", type="text", length=65535, nullable=true)
  404.      * @Assert\NotBlank(
  405.      *      groups={"contentInfosAdmin"},
  406.      *      message="common.blank"
  407.      *   )
  408.      */
  409.     private $contentInfosAdmin;
  410.     /**
  411.      * @var string|null
  412.      *
  413.      * @ORM\Column(name="content_contacts_utiles", type="text", length=65535, nullable=true)
  414.      * @Assert\NotBlank(
  415.      *      groups={"contentContactsUtiles"},
  416.      *      message="common.blank"
  417.      *   )
  418.      */
  419.     private $contentContactsUtiles;
  420.     /**
  421.      * @var string|null
  422.      *
  423.      * @ORM\Column(name="content_processus", type="text", length=65535, nullable=true)
  424.      * @Assert\NotBlank(
  425.      *      groups={"contentProcessus"},
  426.      *      message="common.blank"
  427.      *   )
  428.      */
  429.     private $contentProcessus;
  430.     /**
  431.      * @var string|null
  432.      *
  433.      * @ORM\Column(name="sms_expediteur", type="string", length=20, nullable=true)
  434.      * @Assert\NotBlank(
  435.      *      groups={"smsExpediteur"},
  436.      *      message="common.blank"
  437.      *   )
  438.      * @Assert\Length(
  439.      *       groups={"smsExpediteur"},
  440.      *       max=20,
  441.      *       maxMessage="common.too_long"
  442.      *    )
  443.      */
  444.     private $smsExpediteur;
  445.     /**
  446.      * @var string|null
  447.      *
  448.      * @ORM\Column(name="sms_contenue_langue1", type="text", length=65535, nullable=true)
  449.      * @Assert\NotBlank(
  450.      *      groups={"smsContenueLangue1"},
  451.      *      message="common.blank"
  452.      *   )
  453.      */
  454.     private $smsContenueLangue1;
  455.     /**
  456.      * @var string|null
  457.      *
  458.      * @ORM\Column(name="sms_contenue_langue2", type="text", length=65535, nullable=true)
  459.      * @Assert\NotBlank(
  460.      *      groups={"smsContenueLangue2"},
  461.      *      message="common.blank"
  462.      *   )
  463.      */
  464.     private $smsContenueLangue2;
  465.     /**
  466.      * @var bool
  467.      *
  468.      * @ORM\Column(name="chat_consultation_acces_restreint", type="boolean", nullable=false, options={"default"="0"})
  469.      */
  470.     private $chatConsultationAccesRestreint false;
  471.     /**
  472.      * @var string|null
  473.      *
  474.      * @ORM\Column(name="chat_consultation_creation_mono_langue1", type="text", length=65535, nullable=true)
  475.      * @Assert\NotBlank(
  476.      *      groups={"chatConsultationCreationMonoLangue1"},
  477.      *      message="common.blank"
  478.      *   )
  479.      */
  480.     private $chatConsultationCreationMonoLangue1;
  481.     /**
  482.      * @var string|null
  483.      *
  484.      * @ORM\Column(name="chat_consultation_creation_mono_langue2", type="text", length=65535, nullable=true)
  485.      * @Assert\NotBlank(
  486.      *      groups={"chatConsultationCreationMonoLangue2"},
  487.      *      message="common.blank"
  488.      *   )
  489.      */
  490.     private $chatConsultationCreationMonoLangue2;
  491.     /**
  492.      * @var string|null
  493.      *
  494.      * @ORM\Column(name="chat_consultation_creation_multi_langue1", type="text", length=65535, nullable=true)
  495.      * @Assert\NotBlank(
  496.      *      groups={"chatConsultationCreationMultiLangue1"},
  497.      *      message="common.blank"
  498.      *   )
  499.      */
  500.     private $chatConsultationCreationMultiLangue1;
  501.     /**
  502.      * @var string|null
  503.      *
  504.      * @ORM\Column(name="chat_consultation_creation_multi_langue2", type="text", length=65535, nullable=true)
  505.      * @Assert\NotBlank(
  506.      *      groups={"chatConsultationCreationMultiLangue2"},
  507.      *      message="common.blank"
  508.      *   )
  509.      */
  510.     private $chatConsultationCreationMultiLangue2;
  511.     /**
  512.      * @var string|null
  513.      *
  514.      * @ORM\Column(name="chat_consultation_creation_sans_langue1", type="text", length=65535, nullable=true)
  515.      * @Assert\NotBlank(
  516.      *      groups={"chatConsultationCreationSansLangue1"},
  517.      *      message="common.blank"
  518.      *   )
  519.      */
  520.     private $chatConsultationCreationSansLangue1;
  521.     /**
  522.      * @var string|null
  523.      *
  524.      * @ORM\Column(name="chat_consultation_creation_sans_langue2", type="text", length=65535, nullable=true)
  525.      * @Assert\NotBlank(
  526.      *      groups={"chatConsultationCreationSansLangue2"},
  527.      *      message="common.blank"
  528.      *   )
  529.      */
  530.     private $chatConsultationCreationSansLangue2;
  531.     /**
  532.      * @var \DateTime
  533.      *
  534.      * @ORM\Column(name="date_creation", type="datetime", nullable=false)
  535.      */
  536.     private $dateCreation;
  537.     /**
  538.      * @var \DateTime
  539.      *
  540.      * @ORM\Column(name="date_modification", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP"})
  541.      */
  542.     private $dateModification;
  543.     /**
  544.      * @var \Fonctionnement
  545.      *
  546.      * @ORM\ManyToOne(targetEntity="Fonctionnement")
  547.      * @ORM\JoinColumns({
  548.      *   @ORM\JoinColumn(name="fonctionnement_id", referencedColumnName="id")
  549.      * })
  550.      * @Assert\NotBlank(
  551.      *     groups={"fonctionnement"},
  552.      *     message="common.blank"
  553.      *  )
  554.      */
  555.     private $fonctionnement;
  556.     /**
  557.      * @var \Langue
  558.      *
  559.      * @ORM\ManyToOne(targetEntity="Langue")
  560.      * @ORM\JoinColumns({
  561.      *   @ORM\JoinColumn(name="langue1_id", referencedColumnName="id")
  562.      * })
  563.      * @Assert\NotBlank(
  564.      *     groups={"langue1"},
  565.      *     message="common.blank"
  566.      *  )
  567.      */
  568.     private $langue1;
  569.     /**
  570.      * @var \Langue
  571.      *
  572.      * @ORM\ManyToOne(targetEntity="Langue")
  573.      * @ORM\JoinColumns({
  574.      *   @ORM\JoinColumn(name="langue2_id", referencedColumnName="id")
  575.      * })
  576.      * @Assert\NotBlank(
  577.      *     groups={"langue2"},
  578.      *     message="common.blank"
  579.      *  )
  580.      */
  581.     private $langue2;
  582.     /**
  583.      * @var \SecteurDelaiDefaut
  584.      *
  585.      * @ORM\ManyToOne(targetEntity="SecteurDelaiDefaut")
  586.      * @ORM\JoinColumns({
  587.      *   @ORM\JoinColumn(name="secteur_delai_defaut_id", referencedColumnName="id")
  588.      * })
  589.      * @Assert\NotBlank(
  590.      *     groups={"secteurDelaiDefaut"},
  591.      *     message="common.blank"
  592.      *  )
  593.      */
  594.     private $secteurDelaiDefaut;
  595.     /**
  596.      * @var \Referant
  597.      *
  598.      * @ORM\ManyToOne(targetEntity="Referant")
  599.      * @ORM\JoinColumns({
  600.      *   @ORM\JoinColumn(name="referant_id", referencedColumnName="id")
  601.      * })
  602.      * @Assert\NotBlank(
  603.      *     groups={"referant"},
  604.      *     message="common.blank"
  605.      *  )
  606.      */
  607.     private $referant;
  608.     /**
  609.      * @var \ChatCanal
  610.      *
  611.      * One Secteur has one ChatCanal. This is the inverse side.
  612.      * @ORM\OneToOne(targetEntity="ChatCanal", mappedBy="secteur")
  613.      */
  614.     private $chatCanal;
  615.     /**
  616.      * @var Collection
  617.      *
  618.      * One Secteur has many SecteurCategoriePoidsEspece. This is the inverse side.
  619.      * @ORM\OneToMany(targetEntity="SecteurCategoriePoidsEspece", mappedBy="secteur")
  620.      */
  621.     private $secteurCategoriePoidsEspece;
  622.     /**
  623.      * @var Collection
  624.      *
  625.      * One Secteur has many SecteurCliniqueSecondaire. This is the inverse side.
  626.      * @ORM\OneToMany(targetEntity="SecteurCliniqueSecondaire", mappedBy="secteur")
  627.      */
  628.     private $secteurCliniqueSecondaire;
  629.     /**
  630.      * @var Collection
  631.      *
  632.      * One Secteur has many SecteurConsigne. This is the inverse side.
  633.      * @ORM\OneToMany(targetEntity="SecteurConsigne", mappedBy="secteur")
  634.      */
  635.     private $secteurConsigne;
  636.     /**
  637.      * @var Collection
  638.      *
  639.      * One Secteur has many SecteurGammeTarif. This is the inverse side.
  640.      * @ORM\OneToMany(targetEntity="SecteurGammeTarif", mappedBy="secteur")
  641.      */
  642.     private $secteurGammeTarif;
  643.     /**
  644.      * @var Collection
  645.      *
  646.      * One Secteur has many SecteurPays. This is the inverse side.
  647.      * @ORM\OneToMany(targetEntity="SecteurPays", mappedBy="secteur")
  648.      */
  649.     private $secteurPays;
  650.     /**
  651.      * @var Collection
  652.      *
  653.      * One Secteur has many SecteurPlanningRegulation. This is the inverse side.
  654.      * @ORM\OneToMany(targetEntity="SecteurPlanningRegulation", mappedBy="secteur")
  655.      * @ORM\OrderBy({"planningId" = "ASC", "jourType" = "ASC", "debutHeure" = "ASC"})
  656.      */
  657.     private $secteurPlanningRegulation;
  658.     /**
  659.      * @var Collection
  660.      *
  661.      * One Secteur has many SecteurTexteMail. This is the inverse side.
  662.      * @ORM\OneToMany(targetEntity="SecteurTexteMail", mappedBy="secteur")
  663.      */
  664.     private $secteurTexteMail;
  665.     /**
  666.      * @var Collection
  667.      *
  668.      * One Secteur has many SecteurTextePredefini. This is the inverse side.
  669.      * @ORM\OneToMany(targetEntity="SecteurTextePredefini", mappedBy="secteur")
  670.      */
  671.     private $secteurTextePredefini;
  672.     /**
  673.      * @var Collection
  674.      *
  675.      * One Secteur has many SecteurZone. This is the inverse side.
  676.      * @ORM\OneToMany(targetEntity="SecteurZone", mappedBy="secteur")
  677.      */
  678.     private $secteurZone;
  679.     /**
  680.      * @var Collection
  681.      *
  682.      * One Secteur has many SousSecteur. This is the inverse side.
  683.      * @ORM\OneToMany(targetEntity="SousSecteur", mappedBy="secteur")
  684.      */
  685.     private $sousSecteur;
  686.     /**
  687.      * Constructor
  688.      */
  689.     public function __construct()
  690.     {
  691.         $this->secteurCategoriePoidsEspece = new ArrayCollection();
  692.         $this->secteurCliniqueSecondaire = new ArrayCollection();
  693.         $this->secteurConsigne = new ArrayCollection();
  694.         $this->secteurGammeTarif = new ArrayCollection();
  695.         $this->secteurPays = new ArrayCollection();
  696.         $this->secteurPlanningRegulation = new ArrayCollection();
  697.         $this->secteurTexteMail = new ArrayCollection();
  698.         $this->secteurTextePredefini = new ArrayCollection();
  699.         $this->secteurZone = new ArrayCollection();
  700.         $this->sousSecteur = new ArrayCollection();
  701.     }
  702.     public function getId(): ?int
  703.     {
  704.         return $this->id;
  705.     }
  706.     public function getSiteId(): ?int
  707.     {
  708.         return $this->siteId;
  709.     }
  710.     public function setSiteId(?int $siteId): self
  711.     {
  712.         $this->siteId $siteId;
  713.         return $this;
  714.     }
  715.     public function getNom(): ?string
  716.     {
  717.         return $this->nom;
  718.     }
  719.     public function setNom(string $nom): self
  720.     {
  721.         $this->nom $nom;
  722.         return $this;
  723.     }
  724.     public function getNomRaccourci(): ?string
  725.     {
  726.         return $this->nomRaccourci;
  727.     }
  728.     public function setNomRaccourci(?string $nomRaccourci): self
  729.     {
  730.         $this->nomRaccourci $nomRaccourci;
  731.         return $this;
  732.     }
  733.     public function getNomShort(): ?string
  734.     {
  735.         return $this->nomShort;
  736.     }
  737.     public function setNomShort(?string $nomShort): self
  738.     {
  739.         $this->nomShort $nomShort;
  740.         return $this;
  741.     }
  742.     public function getEmailFrom(): ?string
  743.     {
  744.         return $this->emailFrom;
  745.     }
  746.     public function setEmailFrom(string $emailFrom): self
  747.     {
  748.         $this->emailFrom $emailFrom;
  749.         return $this;
  750.     }
  751.     public function getEmailToTest(): ?string
  752.     {
  753.         return $this->emailToTest;
  754.     }
  755.     public function setEmailToTest(?string $emailToTest): self
  756.     {
  757.         if ($emailToTest === ''$emailToTest null;
  758.         $this->emailToTest $emailToTest;
  759.         return $this;
  760.     }
  761.     public function getCouleur(): ?string
  762.     {
  763.         return $this->couleur;
  764.     }
  765.     public function setCouleur(?string $couleur): self
  766.     {
  767.         $this->couleur $couleur;
  768.         return $this;
  769.     }
  770.     public function getOrdre(): ?int
  771.     {
  772.         return $this->ordre;
  773.     }
  774.     public function setOrdre(int $ordre): self
  775.     {
  776.         $this->ordre $ordre;
  777.         return $this;
  778.     }
  779.     public function getPlanning1Id(): ?int
  780.     {
  781.         return $this->planning1Id;
  782.     }
  783.     public function setPlanning1Id(?int $planning1Id): self
  784.     {
  785.         $this->planning1Id $planning1Id;
  786.         return $this;
  787.     }
  788.     public function getPlanning2Id(): ?int
  789.     {
  790.         return $this->planning2Id;
  791.     }
  792.     public function setPlanning2Id(?int $planning2Id): self
  793.     {
  794.         $this->planning2Id $planning2Id;
  795.         return $this;
  796.     }
  797.     public function getSupervisionPlanningId(): ?int
  798.     {
  799.         return $this->supervisionPlanningId;
  800.     }
  801.     public function setSupervisionPlanningId(?int $supervisionPlanningId): self
  802.     {
  803.         $this->supervisionPlanningId $supervisionPlanningId;
  804.         return $this;
  805.     }
  806.     public function getVetcoachPlanningId(): ?int
  807.     {
  808.         return $this->vetcoachPlanningId;
  809.     }
  810.     public function setVetcoachPlanningId(?int $vetcoachPlanningId): self
  811.     {
  812.         $this->vetcoachPlanningId $vetcoachPlanningId;
  813.         return $this;
  814.     }
  815.     public function getAsvPlanningId(): ?int
  816.     {
  817.         return $this->asvPlanningId;
  818.     }
  819.     public function setAsvPlanningId(?int $asvPlanningId): self
  820.     {
  821.         $this->asvPlanningId $asvPlanningId;
  822.         return $this;
  823.     }
  824.     public function getAstreinteChirurgiePlanningId(): ?int
  825.     {
  826.         return $this->astreinteChirurgiePlanningId;
  827.     }
  828.     public function setAstreinteChirurgiePlanningId(?int $astreinteChirurgiePlanningId): self
  829.     {
  830.         $this->astreinteChirurgiePlanningId $astreinteChirurgiePlanningId;
  831.         return $this;
  832.     }
  833.     public function getAdresse1(): ?string
  834.     {
  835.         return $this->adresse1;
  836.     }
  837.     public function setAdresse1(?string $adresse1): self
  838.     {
  839.         $this->adresse1 $adresse1;
  840.         return $this;
  841.     }
  842.     public function getAdresse2(): ?string
  843.     {
  844.         return $this->adresse2;
  845.     }
  846.     public function setAdresse2(?string $adresse2): self
  847.     {
  848.         if ($adresse2 === ''$adresse2 null;
  849.         $this->adresse2 $adresse2;
  850.         return $this;
  851.     }
  852.     public function getTexteMonoLangue1(): ?string
  853.     {
  854.         return $this->texteMonoLangue1;
  855.     }
  856.     public function setTexteMonoLangue1(?string $texteMonoLangue1): self
  857.     {
  858.         if ($texteMonoLangue1 === ''$texteMonoLangue1 null;
  859.         $this->texteMonoLangue1 $texteMonoLangue1;
  860.         return $this;
  861.     }
  862.     public function getTexteMonoLangue2(): ?string
  863.     {
  864.         return $this->texteMonoLangue2;
  865.     }
  866.     public function setTexteMonoLangue2(?string $texteMonoLangue2): self
  867.     {
  868.         if ($texteMonoLangue2 === ''$texteMonoLangue2 null;
  869.         $this->texteMonoLangue2 $texteMonoLangue2;
  870.         return $this;
  871.     }
  872.     public function getTexteMultiLangue1(): ?string
  873.     {
  874.         return $this->texteMultiLangue1;
  875.     }
  876.     public function setTexteMultiLangue1(?string $texteMultiLangue1): self
  877.     {
  878.         if ($texteMultiLangue1 === ''$texteMultiLangue1 null;
  879.         $this->texteMultiLangue1 $texteMultiLangue1;
  880.         return $this;
  881.     }
  882.     public function getTexteMultiLangue2(): ?string
  883.     {
  884.         return $this->texteMultiLangue2;
  885.     }
  886.     public function setTexteMultiLangue2(?string $texteMultiLangue2): self
  887.     {
  888.         if ($texteMultiLangue2 === ''$texteMultiLangue2 null;
  889.         $this->texteMultiLangue2 $texteMultiLangue2;
  890.         return $this;
  891.     }
  892.     public function getTexteSansLangue1(): ?string
  893.     {
  894.         return $this->texteSansLangue1;
  895.     }
  896.     public function setTexteSansLangue1(?string $texteSansLangue1): self
  897.     {
  898.         if ($texteSansLangue1 === ''$texteSansLangue1 null;
  899.         $this->texteSansLangue1 $texteSansLangue1;
  900.         return $this;
  901.     }
  902.     public function getTexteSansLangue2(): ?string
  903.     {
  904.         return $this->texteSansLangue2;
  905.     }
  906.     public function setTexteSansLangue2(?string $texteSansLangue2): self
  907.     {
  908.         if ($texteSansLangue2 === ''$texteSansLangue2 null;
  909.         $this->texteSansLangue2 $texteSansLangue2;
  910.         return $this;
  911.     }
  912.     public function getCoeffFeux(): ?string
  913.     {
  914.         return $this->coeffFeux;
  915.     }
  916.     public function setCoeffFeux(?string $coeffFeux): self
  917.     {
  918.         if ($coeffFeux === ''$coeffFeux null;
  919.         $this->coeffFeux $coeffFeux;
  920.         return $this;
  921.     }
  922.     public function getLienExterneMessage(): ?string
  923.     {
  924.         return $this->lienExterneMessage;
  925.     }
  926.     public function setLienExterneMessage(?string $lienExterneMessage): self
  927.     {
  928.         if ($lienExterneMessage === ''$lienExterneMessage null;
  929.         $this->lienExterneMessage $lienExterneMessage;
  930.         return $this;
  931.     }
  932.     public function getLienExternePriseAppel(): ?string
  933.     {
  934.         return $this->lienExternePriseAppel;
  935.     }
  936.     public function setLienExternePriseAppel(?string $lienExternePriseAppel): self
  937.     {
  938.         if ($lienExternePriseAppel === ''$lienExternePriseAppel null;
  939.         $this->lienExternePriseAppel $lienExternePriseAppel;
  940.         return $this;
  941.     }
  942.     public function getLienExterneVeterinairePlanning(): ?string
  943.     {
  944.         return $this->lienExterneVeterinairePlanning;
  945.     }
  946.     public function setLienExterneVeterinairePlanning(?string $lienExterneVeterinairePlanning): self
  947.     {
  948.         if ($lienExterneVeterinairePlanning === ''$lienExterneVeterinairePlanning null;
  949.         $this->lienExterneVeterinairePlanning $lienExterneVeterinairePlanning;
  950.         return $this;
  951.     }
  952.     public function getUrlRoot(): ?string
  953.     {
  954.         return $this->urlRoot;
  955.     }
  956.     public function setUrlRoot(?string $urlRoot): self
  957.     {
  958.         if ($urlRoot === ''$urlRoot null;
  959.         $this->urlRoot $urlRoot;
  960.         return $this;
  961.     }
  962.     public function getEmailManagerServiceRegulation(): ?string
  963.     {
  964.         return $this->emailManagerServiceRegulation;
  965.     }
  966.     public function setEmailManagerServiceRegulation(?string $emailManagerServiceRegulation): self
  967.     {
  968.         if ($emailManagerServiceRegulation === ''$emailManagerServiceRegulation null;
  969.         $this->emailManagerServiceRegulation $emailManagerServiceRegulation;
  970.         return $this;
  971.     }
  972.     public function getContentEstimatifTarifs(): ?string
  973.     {
  974.         return $this->contentEstimatifTarifs;
  975.     }
  976.     public function setContentEstimatifTarifs(?string $contentEstimatifTarifs): self
  977.     {
  978.         if ($contentEstimatifTarifs === ''$contentEstimatifTarifs null;
  979.         $this->contentEstimatifTarifs $contentEstimatifTarifs;
  980.         return $this;
  981.     }
  982.     public function getContentInfosSecteur(): ?string
  983.     {
  984.         return $this->contentInfosSecteur;
  985.     }
  986.     public function setContentInfosSecteur(?string $contentInfosSecteur): self
  987.     {
  988.         if ($contentInfosSecteur === ''$contentInfosSecteur null;
  989.         $this->contentInfosSecteur $contentInfosSecteur;
  990.         return $this;
  991.     }
  992.     public function getContentInfosAdmin(): ?string
  993.     {
  994.         return $this->contentInfosAdmin;
  995.     }
  996.     public function setContentInfosAdmin(?string $contentInfosAdmin): self
  997.     {
  998.         if ($contentInfosAdmin === ''$contentInfosAdmin null;
  999.         $this->contentInfosAdmin $contentInfosAdmin;
  1000.         return $this;
  1001.     }
  1002.     public function getContentContactsUtiles(): ?string
  1003.     {
  1004.         return $this->contentContactsUtiles;
  1005.     }
  1006.     public function setContentContactsUtiles(?string $contentContactsUtiles): self
  1007.     {
  1008.         if ($contentContactsUtiles === ''$contentContactsUtiles null;
  1009.         $this->contentContactsUtiles $contentContactsUtiles;
  1010.         return $this;
  1011.     }
  1012.     public function getContentProcessus(): ?string
  1013.     {
  1014.         return $this->contentProcessus;
  1015.     }
  1016.     public function setContentProcessus(?string $contentProcessus): self
  1017.     {
  1018.         if ($contentProcessus === ''$contentProcessus null;
  1019.         $this->contentProcessus $contentProcessus;
  1020.         return $this;
  1021.     }
  1022.     public function getSmsExpediteur(): ?string
  1023.     {
  1024.         return $this->smsExpediteur;
  1025.     }
  1026.     public function setSmsExpediteur(?string $smsExpediteur): self
  1027.     {
  1028.         if ($smsExpediteur === ''$smsExpediteur null;
  1029.         $this->smsExpediteur $smsExpediteur;
  1030.         return $this;
  1031.     }
  1032.     public function getSmsContenueLangue1(): ?string
  1033.     {
  1034.         return $this->smsContenueLangue1;
  1035.     }
  1036.     public function setSmsContenueLangue1(?string $smsContenueLangue1): self
  1037.     {
  1038.         if ($smsContenueLangue1 === ''$smsContenueLangue1 null;
  1039.         $this->smsContenueLangue1 $smsContenueLangue1;
  1040.         return $this;
  1041.     }
  1042.     public function getSmsContenueLangue2(): ?string
  1043.     {
  1044.         return $this->smsContenueLangue2;
  1045.     }
  1046.     public function setSmsContenueLangue2(?string $smsContenueLangue2): self
  1047.     {
  1048.         if ($smsContenueLangue2 === ''$smsContenueLangue2 null;
  1049.         $this->smsContenueLangue2 $smsContenueLangue2;
  1050.         return $this;
  1051.     }
  1052.     public function getChatConsultationAccesRestreint(): ?bool
  1053.     {
  1054.         return $this->chatConsultationAccesRestreint;
  1055.     }
  1056.     public function setChatConsultationAccesRestreint(bool $chatConsultationAccesRestreint): self
  1057.     {
  1058.         $this->chatConsultationAccesRestreint $chatConsultationAccesRestreint;
  1059.         return $this;
  1060.     }
  1061.     public function getChatConsultationCreationMonoLangue1(): ?string
  1062.     {
  1063.         return $this->chatConsultationCreationMonoLangue1;
  1064.     }
  1065.     public function setChatConsultationCreationMonoLangue1(?string $chatConsultationCreationMonoLangue1): self
  1066.     {
  1067.         if ($chatConsultationCreationMonoLangue1 === ''$chatConsultationCreationMonoLangue1 null;
  1068.         $this->chatConsultationCreationMonoLangue1 $chatConsultationCreationMonoLangue1;
  1069.         return $this;
  1070.     }
  1071.     public function getChatConsultationCreationMonoLangue2(): ?string
  1072.     {
  1073.         return $this->chatConsultationCreationMonoLangue2;
  1074.     }
  1075.     public function setChatConsultationCreationMonoLangue2(?string $chatConsultationCreationMonoLangue2): self
  1076.     {
  1077.         if ($chatConsultationCreationMonoLangue2 === ''$chatConsultationCreationMonoLangue2 null;
  1078.         $this->chatConsultationCreationMonoLangue2 $chatConsultationCreationMonoLangue2;
  1079.         return $this;
  1080.     }
  1081.     public function getChatConsultationCreationMultiLangue1(): ?string
  1082.     {
  1083.         return $this->chatConsultationCreationMultiLangue1;
  1084.     }
  1085.     public function setChatConsultationCreationMultiLangue1(?string $chatConsultationCreationMultiLangue1): self
  1086.     {
  1087.         if ($chatConsultationCreationMultiLangue1 === ''$chatConsultationCreationMultiLangue1 null;
  1088.         $this->chatConsultationCreationMultiLangue1 $chatConsultationCreationMultiLangue1;
  1089.         return $this;
  1090.     }
  1091.     public function getChatConsultationCreationMultiLangue2(): ?string
  1092.     {
  1093.         return $this->chatConsultationCreationMultiLangue2;
  1094.     }
  1095.     public function setChatConsultationCreationMultiLangue2(?string $chatConsultationCreationMultiLangue2): self
  1096.     {
  1097.         if ($chatConsultationCreationMultiLangue2 === ''$chatConsultationCreationMultiLangue2 null;
  1098.         $this->chatConsultationCreationMultiLangue2 $chatConsultationCreationMultiLangue2;
  1099.         return $this;
  1100.     }
  1101.     public function getChatConsultationCreationSansLangue1(): ?string
  1102.     {
  1103.         return $this->chatConsultationCreationSansLangue1;
  1104.     }
  1105.     public function setChatConsultationCreationSansLangue1(?string $chatConsultationCreationSansLangue1): self
  1106.     {
  1107.         if ($chatConsultationCreationSansLangue1 === ''$chatConsultationCreationSansLangue1 null;
  1108.         $this->chatConsultationCreationSansLangue1 $chatConsultationCreationSansLangue1;
  1109.         return $this;
  1110.     }
  1111.     public function getChatConsultationCreationSansLangue2(): ?string
  1112.     {
  1113.         return $this->chatConsultationCreationSansLangue2;
  1114.     }
  1115.     public function setChatConsultationCreationSansLangue2(?string $chatConsultationCreationSansLangue2): self
  1116.     {
  1117.         if ($chatConsultationCreationSansLangue2 === ''$chatConsultationCreationSansLangue2 null;
  1118.         $this->chatConsultationCreationSansLangue2 $chatConsultationCreationSansLangue2;
  1119.         return $this;
  1120.     }
  1121.     public function getDateCreation(): ?\DateTimeInterface
  1122.     {
  1123.         return $this->dateCreation;
  1124.     }
  1125.     public function setDateCreation(\DateTimeInterface $dateCreation): self
  1126.     {
  1127.         $this->dateCreation $dateCreation;
  1128.         return $this;
  1129.     }
  1130.     public function getDateModification(): ?\DateTimeInterface
  1131.     {
  1132.         return $this->dateModification;
  1133.     }
  1134.     public function setDateModification(\DateTimeInterface $dateModification): self
  1135.     {
  1136.         $this->dateModification $dateModification;
  1137.         return $this;
  1138.     }
  1139.     public function getFonctionnement(): ?Fonctionnement
  1140.     {
  1141.         return $this->fonctionnement;
  1142.     }
  1143.     public function setFonctionnement(?Fonctionnement $fonctionnement): self
  1144.     {
  1145.         $this->fonctionnement $fonctionnement;
  1146.         return $this;
  1147.     }
  1148.     public function getLangue1(): ?Langue
  1149.     {
  1150.         return $this->langue1;
  1151.     }
  1152.     public function setLangue1(?Langue $langue1): self
  1153.     {
  1154.         $this->langue1 $langue1;
  1155.         return $this;
  1156.     }
  1157.     public function getLangue2(): ?Langue
  1158.     {
  1159.         return $this->langue2;
  1160.     }
  1161.     public function setLangue2(?Langue $langue2): self
  1162.     {
  1163.         $this->langue2 $langue2;
  1164.         return $this;
  1165.     }
  1166.     public function getSecteurDelaiDefaut(): ?SecteurDelaiDefaut
  1167.     {
  1168.         return $this->secteurDelaiDefaut;
  1169.     }
  1170.     public function setSecteurDelaiDefaut(?SecteurDelaiDefaut $secteurDelaiDefaut): self
  1171.     {
  1172.         $this->secteurDelaiDefaut $secteurDelaiDefaut;
  1173.         return $this;
  1174.     }
  1175.     public function getReferant(): ?Referant
  1176.     {
  1177.         return $this->referant;
  1178.     }
  1179.     public function setReferant(?Referant $referant): self
  1180.     {
  1181.         $this->referant $referant;
  1182.         return $this;
  1183.     }
  1184.     public function getVille(): ?Ville
  1185.     {
  1186.         return $this->ville;
  1187.     }
  1188.     public function setVille(?Ville $ville): self
  1189.     {
  1190.         $this->ville $ville;
  1191.         return $this;
  1192.     }
  1193.     /**
  1194.      * Helpers
  1195.      */
  1196.     /**
  1197.      * @return ChatCanal|null
  1198.      */
  1199.     public function getChatCanal(): ?ChatCanal
  1200.     {
  1201.         return $this->chatCanal;
  1202.     }
  1203.     /**
  1204.      * @return array
  1205.      */
  1206.     public function getLanguesArray() :array
  1207.     {
  1208.         $langues = [];
  1209.         if ($this->getLangue1()) {
  1210.             $langues[] = [
  1211.                 'id' => $this->getLangue1()->getId(),
  1212.                 'nom' => $this->getLangue1()->getNom(),
  1213.                 'locale' => $this->getLangue1()->getLocale()
  1214.             ];
  1215.         }
  1216.         if ($this->getLangue2()) {
  1217.             $langues[] = [
  1218.                 'id' => $this->getLangue2()->getId(),
  1219.                 'nom' => $this->getLangue2()->getNom(),
  1220.                 'locale' => $this->getLangue2()->getLocale()
  1221.             ];
  1222.         }
  1223.         return $langues;
  1224.     }
  1225.     /**
  1226.      * @return array
  1227.      */
  1228.     public function getLanguesIdsArray() :array
  1229.     {
  1230.         $langues = [];
  1231.         if ($this->getLangue1()) {
  1232.             $langues[] = $this->getLangue1()->getId();
  1233.         }
  1234.         if ($this->getLangue2()) {
  1235.             $langues[] = $this->getLangue2()->getId();
  1236.         }
  1237.         return $langues;
  1238.     }
  1239.     /**
  1240.      * @return Collection|SecteurCategoriePoidsEspece[]
  1241.      */
  1242.     public function getSecteurCategoriePoidsEspeceCollection(): Collection
  1243.     {
  1244.         $iterator $this->secteurCategoriePoidsEspece->getIterator();
  1245.         $iterator->uasort(function (SecteurCategoriePoidsEspece $firstSecteurCategoriePoidsEspece $second) {
  1246.             # sort by ordre
  1247.             if ($first->getSecteurEspece()->getOrdre() !== $second->getSecteurEspece()->getOrdre()) {
  1248.                 return $first->getSecteurEspece()->getOrdre() <=> $second->getSecteurEspece()->getOrdre();
  1249.             }
  1250.             # sort by min
  1251.             return $first->getMin() <=> $second->getMin();
  1252.         });
  1253.         return new ArrayCollection(iterator_to_array($iterator));
  1254.     }
  1255.     /**
  1256.      * @param int $id
  1257.      * @return bool
  1258.      */
  1259.     public function hasSecteurCategoriePoidsEspeceById(int $id): bool
  1260.     {
  1261.         return $this->getSecteurCategoriePoidsEspeceCollection()->filter(function (SecteurCategoriePoidsEspece $secteurCategoriePoidsEspece) use ($id){
  1262.                 return $secteurCategoriePoidsEspece->getId() == $id;
  1263.             })->count() == 1;
  1264.     }
  1265.     /**
  1266.      * @param int $id
  1267.      * @return SecteurCategoriePoidsEspece
  1268.      * @throws \Exception
  1269.      */
  1270.     public function getSecteurCategoriePoidsEspeceById(int $id): SecteurCategoriePoidsEspece
  1271.     {
  1272.         return $this->getSecteurCategoriePoidsEspeceCollection()->filter(function (SecteurCategoriePoidsEspece $secteurCategoriePoidsEspece) use ($id){
  1273.             return $secteurCategoriePoidsEspece->getId() == $id;
  1274.         })->first();
  1275.     }
  1276.     /**
  1277.      * @return Collection|SecteurCliniqueSecondaire[]
  1278.      */
  1279.     public function getSecteurCliniqueSecondaireCollection(): Collection
  1280.     {
  1281.         return $this->secteurCliniqueSecondaire;
  1282.     }
  1283.     /**
  1284.      * @param int $id
  1285.      * @return bool
  1286.      */
  1287.     public function hasSecteurCliniqueSecondaireById(int $id): bool
  1288.     {
  1289.         return $this->getSecteurCliniqueSecondaireCollection()->filter(function (SecteurCliniqueSecondaire $secteurCliniqueSecondaire) use ($id){
  1290.                 return $secteurCliniqueSecondaire->getId() == $id;
  1291.             })->count() == 1;
  1292.     }
  1293.     /**
  1294.      * @param int $id
  1295.      * @return SecteurCliniqueSecondaire
  1296.      * @throws \Exception
  1297.      */
  1298.     public function getSecteurCliniqueSecondaireById(int $id): SecteurCliniqueSecondaire
  1299.     {
  1300.         return $this->getSecteurCliniqueSecondaireCollection()->filter(function (SecteurCliniqueSecondaire $secteurCliniqueSecondaire) use ($id){
  1301.             return $secteurCliniqueSecondaire->getId() == $id;
  1302.         })->first();
  1303.     }
  1304.     /**
  1305.      * @return Collection|SecteurConsigne[]
  1306.      */
  1307.     public function getSecteurConsigneCollection(): Collection
  1308.     {
  1309.         return $this->secteurConsigne;
  1310.     }
  1311.     /**
  1312.      * @return Collection|SecteurGammeTarif[]
  1313.      */
  1314.     public function getSecteurGammeTarifCollection(): Collection
  1315.     {
  1316.         return $this->secteurGammeTarif;
  1317.     }
  1318.     /**
  1319.      * @param int $jourTypeId
  1320.      * @param \DateTimeInterface $debutHeure
  1321.      * @param \DateTimeInterface $finHeure
  1322.      * @param int $tarifId
  1323.      * @return bool
  1324.      */
  1325.     public function hasSecteurGammeTarif(int $jourTypeId, \DateTimeInterface $debutHeure, \DateTimeInterface $finHeureint $tarifId): bool
  1326.     {
  1327.         return $this->getSecteurGammeTarifCollection()->filter(function (SecteurGammeTarif $secteurGammeTarif) use ($jourTypeId,$debutHeure,$finHeure,$tarifId){
  1328.                 return $secteurGammeTarif->getJourType()->getId() == $jourTypeId
  1329.                     && $secteurGammeTarif->getDebutHeure() == $debutHeure
  1330.                     && $secteurGammeTarif->getFinHeure() == $finHeure
  1331.                     && $secteurGammeTarif->getTarif()->getId() == $tarifId;
  1332.             })->count() == 1;
  1333.     }
  1334.     /**
  1335.      * @param int $jourTypeId
  1336.      * @return Collection|SecteurGammeTarif[]
  1337.      * @throws \Exception
  1338.      */
  1339.     public function getSecteurGammeTarifByJourType(int $jourTypeId): Collection
  1340.     {
  1341.         return $this->getSecteurGammeTarifCollection()->filter(function (SecteurGammeTarif $secteurGammeTarif) use ($jourTypeId){
  1342.             return $secteurGammeTarif->getJourType()->getId() == $jourTypeId;
  1343.         });
  1344.     }
  1345.     /**
  1346.      * @return Collection|SecteurPays[]
  1347.      */
  1348.     public function getSecteurPaysCollection(): Collection
  1349.     {
  1350.         return $this->secteurPays;
  1351.     }
  1352.     /**
  1353.      * @param int $paysId
  1354.      * @return SecteurPays
  1355.      * @throws \Exception
  1356.      */
  1357.     public function getSecteurPaysById(int $paysId): SecteurPays
  1358.     {
  1359.         return $this->getSecteurPaysCollection()->filter(function (SecteurPays $secteurPays) use ($paysId){
  1360.             return $secteurPays->getPays()->getId() == $paysId;
  1361.         })->first();
  1362.     }
  1363.     /**
  1364.      * @param int $paysId
  1365.      * @return bool
  1366.      * @throws \Exception
  1367.      */
  1368.     public function hasPays(int $paysId): bool
  1369.     {
  1370.         return $this->getSecteurPaysCollection()->filter(function (SecteurPays $secteurPays) use ($paysId){
  1371.                 return $secteurPays->getPays()->getId() == $paysId;
  1372.             })->count() == 1;
  1373.     }
  1374.     /**
  1375.      * @return array
  1376.      * @throws \Exception
  1377.      */
  1378.     public function getSecteurPaysIds(): array
  1379.     {
  1380.         $paysIds = [];
  1381.         foreach ($this->getSecteurPaysCollection() as $secteurPays) {
  1382.             $paysIds[] = $secteurPays->getPays()->getId();
  1383.         }
  1384.         return $paysIds;
  1385.     }
  1386.     /**
  1387.      * @return array
  1388.      * @throws \Exception
  1389.      */
  1390.     public function getSecteurPaysArray(): array
  1391.     {
  1392.         $pays = [];
  1393.         foreach ($this->getSecteurPaysCollection() as $secteurPays) {
  1394.             $pays[] = [
  1395.                 'id' => $secteurPays->getPays()->getId(),
  1396.                 'nom' => $secteurPays->getPays()->getNom(),
  1397.                 'indicatif' => $secteurPays->getPays()->getIndicatif(),
  1398.             ];
  1399.         }
  1400.         return $pays;
  1401.     }
  1402.     /**
  1403.      * @return array
  1404.      * @throws \Exception
  1405.      */
  1406.     public function getSecteurPaysPrefixPhonesArray(): array
  1407.     {
  1408.         $prefixPhones = [];
  1409.         foreach ($this->getSecteurPaysCollection() as $secteurPays) {
  1410.             $prefixPhones[$secteurPays->getPays()->getId()] = $secteurPays->getPrefixPhone() ?? '';
  1411.         }
  1412.         return $prefixPhones;
  1413.     }
  1414.     /**
  1415.      * @return Collection|SecteurPlanningRegulation[]
  1416.      */
  1417.     public function getSecteurPlanningRegulationCollection(): Collection
  1418.     {
  1419.         return $this->secteurPlanningRegulation;
  1420.     }
  1421.     /**
  1422.      * @param int $planningId
  1423.      * @param int $jourTypeId
  1424.      * @param \DateTimeInterface $debutHeure
  1425.      * @param \DateTimeInterface $finHeure
  1426.      * @return bool
  1427.      */
  1428.     public function hasSecteurPlanningRegulation(int $planningIdint $jourTypeId, \DateTimeInterface $debutHeure, \DateTimeInterface $finHeure): bool
  1429.     {
  1430.         return $this->getSecteurPlanningRegulationCollection()->filter(function (SecteurPlanningRegulation $secteurPlanningRegulation) use ($planningId,$jourTypeId,$debutHeure,$finHeure){
  1431.                 return $secteurPlanningRegulation->getPlanningId() == $planningId
  1432.                     && $secteurPlanningRegulation->getJourType()->getId() == $jourTypeId
  1433.                     && $secteurPlanningRegulation->getDebutHeure() == $debutHeure
  1434.                     && $secteurPlanningRegulation->getFinHeure() == $finHeure;
  1435.             })->count() == 1;
  1436.     }
  1437.     /**
  1438.      * @return Collection|SecteurTexteMail[]
  1439.      */
  1440.     public function getSecteurTexteMailCollection(): Collection
  1441.     {
  1442.         return $this->secteurTexteMail;
  1443.     }
  1444.     /**
  1445.      * @return Collection|SecteurTextePredefini[]
  1446.      */
  1447.     public function getSecteurTextePredefiniCollection(): Collection
  1448.     {
  1449.         return $this->secteurTextePredefini;
  1450.     }
  1451.     /**
  1452.      * @return Collection|SecteurZone[]
  1453.      */
  1454.     public function getSecteurZoneCollection(): Collection
  1455.     {
  1456.         return $this->secteurZone;
  1457.     }
  1458.     /**
  1459.      * @param int $id
  1460.      * @return bool
  1461.      */
  1462.     public function hasSecteurZoneById(int $id): bool
  1463.     {
  1464.         return $this->getSecteurZoneCollection()->filter(function (SecteurZone $secteurZone) use ($id){
  1465.                 return $secteurZone->getId() == $id;
  1466.             })->count() == 1;
  1467.     }
  1468.     /**
  1469.      * @param int $id
  1470.      * @return SecteurZone
  1471.      * @throws \Exception
  1472.      */
  1473.     public function getSecteurZoneById(int $id): SecteurZone
  1474.     {
  1475.         return $this->getSecteurZoneCollection()->filter(function (SecteurZone $secteurZone) use ($id){
  1476.             return $secteurZone->getId() == $id;
  1477.         })->first();
  1478.     }
  1479.     /**
  1480.      * @return Collection|SousSecteur[]
  1481.      */
  1482.     public function getSousSecteurCollection(): Collection
  1483.     {
  1484.         return $this->sousSecteur;
  1485.     }
  1486.     /**
  1487.      * @param string $nom
  1488.      * @return SousSecteur
  1489.      * @throws \Exception
  1490.      */
  1491.     public function getSousSecteurByNom(string $nom): SousSecteur
  1492.     {
  1493.         return $this->getSousSecteurCollection()->filter(function (SousSecteur $sousSecteur) use ($nom){
  1494.             return $sousSecteur->getNom() == $nom;
  1495.         })->first();
  1496.     }
  1497.     /**
  1498.      * @param string $nom
  1499.      * @return bool
  1500.      * @throws \Exception
  1501.      */
  1502.     public function hasSousSecteurByNom(string $nom): bool
  1503.     {
  1504.         return $this->getSousSecteurCollection()->filter(function (SousSecteur $sousSecteur) use ($nom){
  1505.                 return $sousSecteur->getNom() == $nom;
  1506.             })->count() == 1;
  1507.     }
  1508.     /**
  1509.      * @param int $id
  1510.      * @return bool
  1511.      * @throws \Exception
  1512.      */
  1513.     public function hasSousSecteurById(int $id): bool
  1514.     {
  1515.         return $this->getSousSecteurCollection()->filter(function (SousSecteur $sousSecteur) use ($id){
  1516.                 return $sousSecteur->getId() == $id;
  1517.             })->count() == 1;
  1518.     }
  1519.     /**
  1520.      * @param int $id
  1521.      * @return SousSecteur
  1522.      * @throws \Exception
  1523.      */
  1524.     public function getSousSecteurById(int $id): SousSecteur
  1525.     {
  1526.         return $this->getSousSecteurCollection()->filter(function (SousSecteur $sousSecteur) use ($id){
  1527.             return $sousSecteur->getId() == $id;
  1528.         })->first();
  1529.     }
  1530. }