src/Entity/Backend/Competicion.php line 40

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Backend;
  3. use App\DBAL\Backend\EnumLivescoringFormula;
  4. use App\DBAL\Backend\EnumLivescoringPolicy;
  5. use App\Util\Util;
  6. use App\Util\UtilStatic;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. use JMS\Serializer\Annotation\Type;
  12. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. // use BeSimple\SoapBundle\ServiceDefinition\Annotation as Soap;
  15. /**
  16.  * @ORM\Entity(repositoryClass="App\Repository\Backend\CompeticionRepository")
  17.  * @ORM\Table(
  18.  *     name="Competicion",
  19.  *     indexes={
  20.  *         @ORM\Index(name="Competicion_estado_IDX", columns={"estado"}),
  21.  *         @ORM\Index(name="Competicion_visible_IDX", columns={"visible"}),
  22.  *         @ORM\Index(name="Competicion_rfc_IDX", columns={"rfc"}),
  23.  *         @ORM\Index(name="fk_CompeticionFormula1", columns={"Formula_id"}),
  24.  *         @ORM\Index(name="fk_CompeticionModo1", columns={"Modo_id"}),
  25.  *         @ORM\Index(name="fk_CompeticionClub1", columns={"Club_id"}),
  26.  *         @ORM\Index(name="fk_CompeticionCalculo1", columns={"Calculo_id"}),
  27.  *         @ORM\Index(name="fk_CompeticionClub2", columns={"Organizador_id"}),
  28.  *         @ORM\Index(name="fk_CompeticionCriterio1", columns={"Criterio_id"}),
  29.  *         @ORM\Index(name="fk_CompeticionCriterio2", columns={"Criterio2_id"})
  30.  *     }
  31.  * )
  32.  * @ORM\HasLifecycleCallbacks
  33.  * @Gedmo\SoftDeleteable(fieldName="deleted_at", timeAware=false)
  34.  * Soap\Alias("Competicion")
  35.  */
  36. class Competicion
  37. {
  38.     const DEFAULT_LOWER_HANDICAPS_TO_USE 8;
  39.     /**
  40.      * @ORM\Id
  41.      * @ORM\GeneratedValue(strategy="AUTO")
  42.      * @ORM\Column(type="integer", length=8)
  43.      * Soap\ComplexType("int",nillable=true)
  44.      */
  45.     private $id;
  46.     /**
  47.      * @ORM\Column(type="string", length=8, nullable=true)
  48.      * Soap\ComplexType("string")
  49.      */
  50.     private $codigo;
  51.     /**
  52.      * @ORM\Column(type="string", length=15, nullable=true)
  53.      * Soap\ComplexType("string")
  54.      */
  55.     private $codigo_contable;
  56.     /**
  57.      * @ORM\Column(type="string", length=255)
  58.      * Soap\ComplexType("string")
  59.      */
  60.     private $nombre;
  61.     /**
  62.      * @ORM\Column(type="date")
  63.      * Soap\ComplexType("date")
  64.      * @Type("DateTime<'Y-m-d\TH:i:s'>")
  65.      */
  66.     private $fecha;
  67.     /**
  68.      * @ORM\Column(type="datetime",nullable=true)
  69.      * Soap\ComplexType("date", nillable=true)
  70.      * @Type("DateTime<'Y-m-d\TH:i:s'>")
  71.      */
  72.     private $inicio;
  73.     /**
  74.      * @ORM\Column(type="datetime",nullable=true)
  75.      * Soap\ComplexType("date", nillable=true)
  76.      * @Type("DateTime<'Y-m-d\TH:i:s'>")
  77.      */
  78.     private $fin;
  79.     /**
  80.      * @ORM\Column(type="integer")
  81.      * Soap\ComplexType("int")
  82.      */
  83.     private $plazas;
  84.     /**
  85.      * @ORM\Column(type="integer")
  86.      * Soap\ComplexType("int")
  87.      */
  88.     private $jugadores;
  89.     /**
  90.      * @ORM\ManyToOne(targetEntity="Destacada")
  91.      * @ORM\JoinColumn(name="destacada", referencedColumnName="id", onDelete="restrict")
  92.      *
  93.      */
  94.     //Soap\ComplexType("int", nillable=true)
  95.     private $destacada;
  96.     /**
  97.      * @ORM\Column(type="text",nullable=true)
  98.      * Soap\ComplexType("string", nillable=true)
  99.      */
  100.     private $observaciones;
  101.     /**
  102.      * @ORM\Column(type="text",nullable=true)
  103.      */
  104.     private $observaciones_planificacion;
  105.     /**
  106.      * @ORM\Column(type="text", nullable=true)
  107.      * Soap\ComplexType("string", nillable=true)
  108.      */
  109.     private $aviso;
  110.     /**
  111.      * @ORM\Column(type="text",nullable=true)
  112.      * Soap\ComplexType("string", nillable=true)
  113.      */
  114.     private $informacion;
  115. //    /**
  116. //     * @ORM\Column(type="date")
  117. //     * Soap\ComplexType("date")
  118. //     */
  119. //    private $created_at;
  120. //    /**
  121. //     * @ORM\Column(type="date")
  122. //     * Soap\ComplexType("date")
  123. //     */
  124. //    private $updated_at;
  125.     /**
  126.      * @ORM\Column(type="integer", length=8, nullable=true)
  127.      * Soap\ComplexType("int", nillable=true)
  128.      */
  129.     private $rfeg_id;
  130.     /**
  131.      * @ORM\Column(name="cartel", type="string",nullable=true)
  132.      * Soap\ComplexType("string", nillable=true)
  133.      */
  134.     private $cartel;
  135.     /**
  136.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 60 mb", mimeTypes={"application/pdf", "image/jpeg"})
  137.      */
  138.     public $file_cartel;
  139.     /**
  140.      * @ORM\Column(name="horario", type="string",nullable=true)
  141.      * Soap\ComplexType("string", nillable=true)
  142.      */
  143.     private $horario;
  144.     /**
  145.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 4 mb", mimeTypes={"application/pdf"})
  146.      *
  147.      */
  148.     public $file_horario;
  149.     /**
  150.      * @ORM\Column(name="fichero_inscritos", type="string",nullable=true)
  151.      * Soap\ComplexType("string", nillable=true)
  152.      */
  153.     private $fichero_inscritos;
  154.     /**
  155.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 4 mb", mimeTypes={"application/pdf"})
  156.      *
  157.      */
  158.     public $file_inscritos;
  159.     /**
  160.      * @ORM\Column(name="fichero_clasificaciones", type="string",nullable=true)
  161.      * Soap\ComplexType("string", nillable=true)
  162.      */
  163.     private $fichero_clasificaciones;
  164.     /**
  165.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 4 mb", mimeTypes={"application/pdf"})
  166.      *
  167.      */
  168.     public $file_clasificaciones;
  169.     /**
  170.      * @ORM\Column(name="fichero_localeRulePdf", type="string",nullable=true)
  171.      * Soap\ComplexType("string", nillable=true)
  172.      */
  173.     public $fichero_localeRulePdf;
  174.     /**
  175.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 4 mb", mimeTypes={"application/pdf"})
  176.      *
  177.      */
  178.     public $file_localeRulePdf;
  179.     /**
  180.      * @ORM\Column(name="fichero_banner_schedule", type="string",nullable=true)
  181.      * Soap\ComplexType("string", nillable=true)
  182.      */
  183.     public $fichero_banner_schedule;
  184.     /**
  185.      * @Assert\File(maxSize="4M", maxSizeMessage = "La imagen es demasiado grande, debe ser menor de 4 mb", mimeTypes={"image/png", "image/jpeg", "image/jpg", "image/gif"})
  186.      */
  187.     public $file_banner_schedule;
  188.     /**
  189.      * @ORM\Column(name="fichero_reglas", type="string",nullable=true)
  190.      * Soap\ComplexType("string", nillable=true)
  191.      */
  192.     private $fichero_reglas;
  193.     /**
  194.      * @ORM\Column(name="fichero_varios_nombre", type="string",nullable=true)
  195.      * Soap\ComplexType("string", nillable=true)
  196.      */
  197.     private $fichero_varios_nombre;
  198.     /**
  199.      * @ORM\Column(name="fichero_varios", type="string",nullable=true)
  200.      * Soap\ComplexType("string", nillable=true)
  201.      */
  202.     private $fichero_varios;
  203.     /**
  204.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 4 mb", mimeTypes={"application/pdf"})
  205.      *
  206.      */
  207.     public $file_reglas;
  208.     /**
  209.      * @Assert\File(maxSize="4M", maxSizeMessage = "El fichero es demasiado grande, debe ser menor de 4 mb", mimeTypes={"application/pdf"})
  210.      *
  211.      */
  212.     public $file_varios;
  213.     //Ficticios para el manejo de los ficheros
  214.     public $temp_reglas;
  215.     public $temp_clasificaciones;
  216.     public $temp_localeRulePdf;
  217.     public $temp_banner_schedule;
  218.     public $temp_inscritos;
  219.     public $temp_horario;
  220.     public $temp_cartel;
  221.     public $temp_varios;
  222.     /**
  223.      * @ORM\Column(type="string", length=255,nullable=true)
  224.      * Soap\ComplexType("string", nillable=true)
  225.      */
  226.     private $circular;
  227.     /**
  228.      * @ORM\Column(type="string", length=255,nullable=true)
  229.      * Soap\ComplexType("string", nillable=true)
  230.      */
  231.     private $nombre_observaciones;
  232.     /**
  233.      * @ORM\Column(type="boolean")
  234.      * Soap\ComplexType("boolean")
  235.      */
  236.     // private $facturar_automatico;
  237.     /**
  238.      * @ORM\Column(type="boolean")
  239.      * Soap\ComplexType("boolean")
  240.      */
  241.     //private $corte_cerrado;
  242.     //
  243.     //@ORM\Column(type="boolean")
  244.     // Soap\ComplexType("boolean")
  245.     //
  246.     //private $ega_actualizado;
  247.     /**
  248.      * @ORM\ManyToOne(targetEntity="Formula")
  249.      * @ORM\JoinColumn(name="Formula_id", referencedColumnName="id", onDelete="restrict")
  250.      * Soap\ComplexType("App\Entity\Backend\Formula", nillable=true)
  251.      * @Type("App\Entity\Backend\Formula")
  252.      */
  253.     private $formula;
  254.     /**
  255.      * @ORM\ManyToOne(targetEntity="Modo")
  256.      * @ORM\JoinColumn(name="Modo_id", referencedColumnName="id", onDelete="restrict")
  257.      * Soap\ComplexType("App\Entity\Backend\Modo", nillable=true)
  258.      * @Type("App\Entity\Backend\Modo")
  259.      */
  260.     private $modo;
  261.     /**
  262.      * @ORM\ManyToOne(targetEntity="Calculo")
  263.      * @ORM\JoinColumn(name="Calculo_id", referencedColumnName="id", onDelete="restrict")
  264.      * Soap\ComplexType("App\Entity\Backend\Calculo", nillable=true)
  265.      * @Type("App\Entity\Backend\Calculo")
  266.      */
  267.     private $calculo;
  268.     /**
  269.      * @ORM\ManyToOne(targetEntity="Club")
  270.      * @ORM\JoinColumn(name="Club_id", referencedColumnName="id", onDelete="restrict")
  271.      * Soap\ComplexType("App\Entity\Backend\Club", nillable=true)
  272.      * @Type("App\Entity\Backend\Club")
  273.      */
  274.     private $club;
  275.     /**
  276.      * @ORM\ManyToOne(targetEntity="Club")
  277.      * @ORM\JoinColumn(name="Organizador_id", referencedColumnName="id", onDelete="restrict")
  278.      * Soap\ComplexType("App\Entity\Backend\Club", nillable=true)
  279.      * @Type("App\Entity\Backend\Club")
  280.      */
  281.     private $organizador;
  282.     /**
  283.      * Soap\ComplexType("App\Entity\Backend\Albaran", nillable=true)
  284.      * @Type("App\Entity\Backend\Albaran")
  285.      */
  286.     private $albaran;
  287.     /**
  288.      * @ORM\OneToMany(targetEntity="Albaran", mappedBy="competicion")
  289.      * @ORM\OrderBy({"numero" = "ASC"})
  290.      * */
  291.     private $albaranes;
  292.     /**
  293.      * @ORM\ManyToOne(targetEntity="Criterio")
  294.      * @ORM\JoinColumn(name="Criterio_id", referencedColumnName="id", onDelete="restrict")
  295.      *
  296.      */
  297.     // Soap\ComplexType("int", nillable=true)
  298.     private $criterio;
  299.     /**
  300.      * @ORM\ManyToOne(targetEntity="Criterio")
  301.      * @ORM\JoinColumn(name="Criterio2_id", referencedColumnName="id", onDelete="restrict")
  302.      *
  303.      */
  304.     // Soap\ComplexType("int", nillable=true)
  305.     private $criterio2;
  306.     /**
  307.      * @ORM\Column(type="string", length=255, nullable=true)
  308.      */
  309.     private $hash;
  310.     /**
  311.      * @ORM\ManyToMany(targetEntity="App\Entity\Backend\Comite")
  312.      * @ORM\JoinTable(name="Comite_Competicion",
  313.      *      joinColumns={@ORM\JoinColumn(name="competicion_id", referencedColumnName="id")},
  314.      *      inverseJoinColumns={@ORM\JoinColumn(name="Comite_id", referencedColumnName="id")}
  315.      * )
  316.      * @ORM\OrderBy({"cliente" = "ASC", "activo" = "DESC", "nombre" = "ASC"})
  317.      */
  318.     private $comites;
  319.     /**
  320.      * @ORM\ManyToMany(targetEntity="\App\Entity\Backend\Circuito",inversedBy="competiciones")
  321.      * @ORM\JoinTable(name="Circuito_Competicion")
  322.      * )
  323.      * @ORM\OrderBy({"cliente" = "ASC", "fecha_inicio" = "ASC", "fecha_fin" = "ASC", "nombre" = "ASC"})
  324.      */
  325.     private $circuitos;
  326.     /** @ORM\Column(type="enumestadocompeticion")
  327.      * Soap\ComplexType("string", nillable=true)
  328.      * @Type("string")
  329.      */
  330.     private $estado;
  331.     /** @ORM\Column(type="enumestadocorte")
  332.      * Soap\ComplexType("string", nillable=true)
  333.      * @Type("string")
  334.      */
  335.     private $estado_corte;
  336.     /**
  337.      * @var \DateTime $created_at
  338.      *
  339.      * @Gedmo\Timestampable(on="create")
  340.      * @ORM\Column(type="datetime",nullable=true)
  341.      * Soap\ComplexType("date")
  342.      * @Type("DateTime<'Y-m-d\TH:i:s'>")
  343.      */
  344.     private $created_at;
  345.     /**
  346.      * @var \DateTime $updated_at
  347.      *
  348.      * @Gedmo\Timestampable(on="update")
  349.      * @ORM\Column(type="datetime",nullable=true)
  350.      * Soap\ComplexType("date")
  351.      * @Type("DateTime<'Y-m-d\TH:i:s'>")
  352.      */
  353.     private $updated_at;
  354.     /**
  355.      * @ORM\OneToMany(targetEntity="Inscrito", mappedBy="competicion")
  356.      * */
  357.     private $inscritos;
  358.     /**
  359.      * @ORM\OneToMany(targetEntity="Categoria", mappedBy="competicion")
  360.      * */
  361.     private $categorias;
  362.     /**
  363.      * @ORM\OneToMany(targetEntity="Tarifa", mappedBy="competicion", cascade={"persist", "remove"}, orphanRemoval=true)
  364.      * */
  365.     private $tarifas;
  366.     /**
  367.      * @ORM\Column(type="boolean", nullable=true)
  368.      */
  369.     private $tarifa_reglamento;
  370.     /**
  371.      * @ORM\OneToMany(targetEntity="Jornada", mappedBy="competicion", cascade={"persist"})
  372.      * @ORM\OrderBy({"orden" = "ASC"})
  373.      * */
  374.     private $jornadas;
  375.     /**
  376.      * @ORM\Column(type="string", length=255, nullable=true)
  377.      */
  378.     private $redireccion;
  379.     /**
  380.      * @ORM\Column(type="boolean", nullable=false)
  381.      */
  382.     private $wagr false;
  383.     /**
  384.      * @ORM\Column(type="boolean", nullable=false)
  385.      */
  386.     private $sace false;
  387.     /**
  388.      * @ORM\Column(type="boolean", nullable=false)
  389.      */
  390.     private $subvencion_junta true;
  391.     /**
  392.      * @ORM\Column(type="string", length=255, nullable=true)
  393.      */
  394.     private $galeria;
  395.     /**
  396.      * @ORM\Column(type="text",nullable=true)
  397.      * Soap\ComplexType("string", nillable=true)
  398.      */
  399.     private $informacion_popup;
  400.     /**
  401.      * @ORM\Column(type="text",nullable=true)
  402.      *
  403.      */
  404.     private $reglas;
  405.     /**
  406.      * @ORM\Column(type="integer", length=2, nullable=false)
  407.      * Soap\ComplexType("int")
  408.      */
  409.     private $num_competiciones 0;
  410.     /**
  411.      * @ORM\Column(type="string", length=6, nullable=true)
  412.      * Soap\ComplexType("string", nillable=true)
  413.      */
  414.     private $tag_color;
  415.     /**
  416.      * @ORM\ManyToMany(targetEntity="App\Entity\Backend\Club", inversedBy="solicitadas")
  417.      * @ORM\JoinTable(name="Club_Aspirante",
  418.      *      joinColumns={@ORM\JoinColumn(name="competicion_id", referencedColumnName="id")},
  419.      *      inverseJoinColumns={@ORM\JoinColumn(name="club_id", referencedColumnName="id")}
  420.      * )
  421.      */
  422.     private $aspirantes;
  423.     /**
  424.      * @ORM\ManyToMany(targetEntity="App\Entity\Backend\Club", inversedBy="preferencias")
  425.      * @ORM\JoinTable(name="Club_Preferente",
  426.      *      joinColumns={@ORM\JoinColumn(name="competicion_id", referencedColumnName="id")},
  427.      *      inverseJoinColumns={@ORM\JoinColumn(name="club_id", referencedColumnName="id")}
  428.      * )
  429.      */
  430.     private $preferentes;
  431.     /**
  432.      * @ORM\Column(type="enumestadolivescoring", nullable=true)
  433.      *
  434.      */
  435.     private $show_live_scoring "club";
  436.     /**
  437.      * @ORM\Column(type="boolean", nullable=false)
  438.      *
  439.      */
  440.     private $rfc false;
  441.     /**
  442.      * @ORM\Column(type="boolean", nullable=false)
  443.      */
  444.     private $estricto true;
  445.     /**
  446.      * @ORM\Column(type="boolean", nullable=false)
  447.      */
  448.     private $hcp_estricto false;
  449.     /**
  450.      * @ORM\Column(type="decimal", length=2, nullable=false, scale=1, options={"default" : 99})
  451.      * Soap\ComplexType("float")
  452.      */
  453.     private $hcp_inscrito_masculino 99//26.4;
  454.     /**
  455.      * @ORM\Column(type="decimal", length=2, nullable=false, scale=1, options={"default" : -10})
  456.      * @Type("float")
  457.      * Soap\ComplexType("float")
  458.      */
  459.     private $hcp_inscrito_masculino_min = -10;  //
  460.     /**
  461.      * @ORM\Column(type="decimal", length=2, nullable=false, scale=1, options={"default" : 99})
  462.      * @Type("float")
  463.      * Soap\ComplexType("float")
  464.      */
  465.     private $hcp_inscrito_femenino 99;  //36.0;
  466.     /**
  467.      * @ORM\Column(type="decimal", length=2, nullable=false, scale=1, options={"default" : -10})
  468.      * @Type("float")
  469.      * Soap\ComplexType("float")
  470.      */
  471.     private $hcp_inscrito_femenino_min = -10;   //El minimo handicap es
  472.     /**
  473.      * @ORM\Column(type="integer", nullable=true)
  474.      * Soap\ComplexType("int", nillable=true)
  475.      */
  476.     private $hcp_juego_inscripcion_masculino_min;
  477.     /**
  478.      * @ORM\Column(type="integer", nullable=true)
  479.      * Soap\ComplexType("int", nillable=true)
  480.      */
  481.     private $hcp_juego_inscripcion_masculino_max;
  482.     /**
  483.      * @ORM\Column(type="integer", nullable=true)
  484.      * Soap\ComplexType("int", nillable=true)
  485.      */
  486.     private $hcp_juego_inscripcion_femenino_min;
  487.     /**
  488.      * @ORM\Column(type="integer", nullable=true)
  489.      * Soap\ComplexType("int", nillable=true)
  490.      */
  491.     private $hcp_juego_inscripcion_femenino_max;
  492.     /**
  493.      * @ORM\Column(type="smallint", nullable=false, options={"default" : 70})
  494.      * Soap\ComplexType("int")
  495.      */
  496.     private $hcp_juego_masculino 70;
  497.     /**
  498.      * @ORM\Column(type="smallint", nullable=false, options={"default" : 70})
  499.      * Soap\ComplexType("int")
  500.      */
  501.     private $hcp_juego_femenino 70;
  502.     /**
  503.      * @ORM\Column(type="smallint", nullable=false, options={"default" : 99})
  504.      * Soap\ComplexType("int")
  505.      */
  506.     private $hcp_juego_pareja 99;
  507.     /**
  508.      * @ORM\Column(type="smallint", nullable=false, options={"default" : 999})
  509.      * Soap\ComplexType("int")
  510.      */
  511.     private $hcp_juego_equipo 999;
  512.     /**
  513.      * @ORM\Column(type="text", nullable=true)
  514.      */
  515.     private $premios;
  516.     /**
  517.      * @ORM\Column(type="boolean", nullable=false)
  518.      */
  519.     private $arbitrable false;
  520.     /**
  521.      * @ORM\Column(type="boolean", nullable=false)
  522.      */
  523.     private $direccion_torneos false;
  524.     /**
  525.      * @ORM\Column(type="boolean", nullable=false)
  526.      */
  527.     private $asistencia_presidente false;
  528.     /**
  529.      * @ORM\Column(type="boolean", nullable=false)
  530.      */
  531.     private $institucional false;
  532.     /**
  533.      * @ORM\Column(type="boolean", nullable=false)
  534.      */
  535.     private $voluntarios false;
  536.     /**
  537.      * @ORM\Column(type="boolean", nullable=false)
  538.      */
  539.     private $flyer false;
  540.     /**
  541.      * @ORM\Column(type="boolean", nullable=false)
  542.      */
  543.     private $permitir false;
  544.     /**
  545.      * @ORM\Column(type="boolean", nullable=false)
  546.      *
  547.      */
  548.     private $social false;
  549.     /**
  550.      * @ORM\Column(type="boolean", nullable=false)
  551.      *
  552.      */
  553.     private $visible true;
  554.     /**
  555.      * @ORM\Column(type="boolean", nullable=false)
  556.      *
  557.      */
  558.     private $seguimiento false;
  559.     /**
  560.      * @ORM\Column(type="boolean", nullable=false)
  561.      */
  562.     private $popup_inscripcion false;
  563.     /**
  564.      * @ORM\Column(type="text", nullable=true)
  565.      */
  566.     private $popup_inscripcion_texto;
  567.     /**
  568.      * @ORM\Column(type="boolean", nullable=false)
  569.      */
  570.     private $mostrar_sorteo false;
  571.     /**
  572.      * @ORM\OneToMany(targetEntity="DatoAdicional", mappedBy="competicion", cascade={"persist", "remove"}, orphanRemoval=true)
  573.      * */
  574.     private $adicionales;
  575.     /**
  576.      * @ORM\ManyToOne(targetEntity=CompetitionRegistrationForm::class)
  577.      * @ORM\JoinColumn(name="registration_form_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
  578.      */
  579.     private $registrationForm;
  580.     /**
  581.      * @ORM\Column(type="boolean", nullable=false)
  582.      */
  583.     private $lista_espera false;
  584.     /**
  585.      * @ORM\Column(type="enumestadorestringirlicencias", nullable=true)
  586.      */
  587.     private $restringir_licencia;
  588.     /**
  589.      * @ORM\Column(type="boolean", nullable=false)
  590.      */
  591.     private $seleccion_tarifas false;
  592.     /**
  593.      * @ORM\Column(type="boolean", nullable=false)
  594.      */
  595.     private $permitir_extranjeros false;
  596.     /**
  597.      * @ORM\Column(type="smallint", nullable=true)
  598.      */
  599.     private $plazas_manana;
  600.     /**
  601.      * @ORM\Column(type="smallint", nullable=true)
  602.      */
  603.     private $plazas_tarde;
  604.     /**
  605.      * @ORM\Column(type="boolean", nullable=false)
  606.      * Soap\ComplexType("boolean")
  607.      */
  608.     private $tarjeta_electronica false;
  609.     /**
  610.      * @ORM\Column(type="boolean", nullable=false)
  611.      */
  612.     private $auto_assign_marker false;
  613.     /**
  614.      * @ORM\Column(type="boolean", nullable=false)
  615.      */
  616.     private $livescoring_comunidad false;
  617.     /**
  618.      * @ORM\Column(type="smallint", nullable=true)
  619.      */
  620.     private $plazas_lista_espera;
  621.     /**
  622.      * @var \DateTime|null
  623.      *
  624.      * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
  625.      */
  626.     private $deleted_at;
  627.     /**
  628.      * @ORM\Column(type="string", length=255, nullable=true)
  629.      */
  630.     private $contacto;
  631.     /**
  632.      * @ORM\OneToMany(targetEntity="\App\Entity\Gestion\CompeticionRanking", mappedBy="competicion")
  633.      *
  634.      */
  635.     private $rankings;
  636.     /**
  637.      * @ORM\Column(type="boolean", nullable=false)
  638.      */
  639.     private $benefico false;
  640.     /**
  641.      * @ORM\ManyToMany(targetEntity="App\Entity\Backend\Voucher", inversedBy="competiciones")
  642.      * @ORM\JoinTable(name="Voucher_Competicion")
  643.      * @ORM\OrderBy({"fechaInicio" = "ASC", "fechaFin" = "ASC"})
  644.      */
  645.     private $vouchers;
  646.     /**
  647.      * @ORM\Column(type="string", nullable=true)
  648.      */
  649.     private $flickr_gallery null;
  650.     /**
  651.      * @ORM\Column(name="barra_salida", type="boolean", nullable=false)
  652.      */
  653.     private $barra_salida false;
  654.     /**
  655.      * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  656.      */
  657.     private $observaciones_frontend false;
  658.     /**
  659.      * @ORM\Column(type="boolean", nullable=false)
  660.      */
  661.     private $mostrar_plazas true;
  662.     /**
  663.      * @ORM\Column(type="smallint", nullable=true, options={"default" : 1})
  664.      */
  665.     private $politica_inicio 1;
  666.     /**
  667.      * @ORM\Column(type="smallint", nullable=true, options={"default" : 1})
  668.      */
  669.     private $politica_entrega 1;
  670.     /**
  671.      * @ORM\Column(name="short_url", type="string", length=255, nullable=true)
  672.      */
  673.     private $short_url;
  674.     /**
  675.      * @ORM\Column(type="boolean", options={"default" : 0})
  676.      */
  677.     private $privada false;
  678.     /**
  679.      * @ORM\OneToOne(targetEntity=MarcadorRfc::class, mappedBy="competicion", cascade={"persist", "remove"})
  680.      */
  681.     private $marcadorRfc;
  682.     /**
  683.      * @ORM\OneToMany(targetEntity=MensajeTorneo::class, mappedBy="competicion")
  684.      */
  685.     private $mensajeTorneos;
  686.     /**
  687.      * @ORM\OneToMany(targetEntity="App\Entity\Gestion\Ronda", mappedBy="competicion")
  688.      */
  689.     private $rondas;
  690.     /**
  691.      * @ORM\Column(type="string", length=255, nullable=true)
  692.      */
  693.     private $camera_url;
  694.     /**
  695.      * @ORM\Column(type="enumtipoconfiguracionmatchplay", nullable=true)
  696.      */
  697.     private $tipo_configuracion_matchplay;
  698.     /**
  699.      * @ORM\Column(type="date", nullable=true)
  700.      * @Type("DateTime<'Y-m-d'>")
  701.      */
  702.     private $liquidation_date;
  703.     /**
  704.      * @ORM\Column(type="date", nullable=true)
  705.      * @Type("DateTime<'Y-m-d'>")
  706.      */
  707.     private $collection_date;
  708.     /**
  709.      * @ORM\OneToMany(targetEntity=CompetitionSectionHidden::class, mappedBy="competition", orphanRemoval=false)
  710.      */
  711.     private $competitionSectionHidden;
  712.     /**
  713.      *
  714.      * @ORM\Column(name="livescoring_policy", type="enumlivescoringpolicy", nullable=false)
  715.      */
  716.     private $livescoring_policy EnumLivescoringPolicy::PLAYER_RESULTS;
  717.     /**
  718.      *
  719.      * @ORM\Column(name="livescoring_formula", type="enumlivescoringformula", nullable=false)
  720.      */
  721.     private $livescoring_formula EnumLivescoringFormula::HANDICAP_SCRATCH;
  722.     /**
  723.      * @ORM\Column(type="boolean", nullable=false)
  724.      * Soap\ComplexType("boolean")
  725.      */
  726.     private $show_events false;
  727.     /**
  728.      * @ORM\Column(type="boolean")
  729.      */
  730.     private $advanced_hcp_calculation false;
  731.     /**
  732.      * @ORM\Column(type="boolean")
  733.      */
  734.     private $apply_average_hcp false;
  735.     /**
  736.      * @ORM\Column(type="smallint", nullable=true)
  737.      */
  738.     private $lower_handicaps_to_use self::DEFAULT_LOWER_HANDICAPS_TO_USE;
  739.     /**
  740.      * @ORM\Column(type="boolean", nullable=true)
  741.      */
  742.     private $can_put_ball null;
  743.     /**
  744.      * @ORM\Column(type="boolean", nullable=true)
  745.      */
  746.     private $can_use_meters null;
  747.     /**
  748.      * @ORM\Column(type="boolean", nullable=true)
  749.      */
  750.     private $can_give_advice null;
  751.     /**
  752.      * @ORM\Column(type="string", length=250, nullable=true)
  753.      */
  754.     private $ecard_initial_message null;
  755.     /**
  756.      * @ORM\Column(type="boolean", options={"default"=false})
  757.      */
  758.     private $hole_distance false;
  759.     /**
  760.      * @ORM\OneToMany(targetEntity=RfcCompetition::class, mappedBy="competition", orphanRemoval=true)
  761.      */
  762.     private $rfcCompetitions;
  763.     public function __construct()
  764.     {
  765.         $this->aspirantes = new ArrayCollection();
  766.         $this->preferentes = new ArrayCollection();
  767.         $this->comites = new ArrayCollection();
  768.         $this->jornadas = new ArrayCollection();
  769.         $this->albaranes = new ArrayCollection();
  770.         $this->rankings = new ArrayCollection();
  771.         $this->circuitos = new ArrayCollection();
  772.         $this->inscritos = new ArrayCollection();
  773.         $this->categorias = new ArrayCollection();
  774.         $this->tarifas = new ArrayCollection();
  775.         $this->adicionales = new ArrayCollection();
  776.         $this->vouchers = new ArrayCollection();
  777.         $this->mensajeTorneos = new ArrayCollection();
  778.         $this->competitionSectionHidden = new ArrayCollection();
  779.         $this->rfcCompetitions = new ArrayCollection();
  780.     }
  781.     /**
  782.      * Get id
  783.      *
  784.      * @return integer
  785.      */
  786.     public function getId()
  787.     {
  788.         return $this->id;
  789.     }
  790.     /**
  791.      * Set id
  792.      *
  793.      * @param string $id
  794.      * @return Competicion
  795.      */
  796.     public function setId(?int $id)
  797.     {
  798.         if (!empty($id) && $id !== 'null') {
  799.             $this->id $id;
  800.         }
  801.         return $this;
  802.     }
  803.     /**
  804.      * Set codigo
  805.      *
  806.      * @param string $codigo
  807.      * @return Competicion
  808.      */
  809.     public function setCodigo($codigo)
  810.     {
  811.         $this->codigo $codigo;
  812.         return $this;
  813.     }
  814.     /**
  815.      * Get codigo
  816.      *
  817.      * @return string
  818.      */
  819.     public function getCodigo()
  820.     {
  821.         return $this->codigo;
  822.     }
  823.     /**
  824.      * Set nombre
  825.      *
  826.      * @param string $nombre
  827.      * @return Competicion
  828.      */
  829.     public function setNombre($nombre)
  830.     {
  831.         $this->nombre $nombre;
  832.         return $this;
  833.     }
  834.     /**
  835.      * Get nombre
  836.      *
  837.      * @return string
  838.      */
  839.     public function getNombre()
  840.     {
  841.         return $this->nombre;
  842.     }
  843.     /**
  844.      * Set fecha
  845.      *
  846.      * @param \DateTime $fecha
  847.      * @return Competicion
  848.      */
  849.     public function setFecha($fecha)
  850.     {
  851.         $this->fecha $fecha;
  852.         return $this;
  853.     }
  854.     /**
  855.      * Get fecha
  856.      *
  857.      * @return \DateTime
  858.      */
  859.     public function getFecha()
  860.     {
  861.         return $this->fecha;
  862.     }
  863.     /**
  864.      * Set inicio
  865.      *
  866.      * @param \DateTime $inicio
  867.      * @return Competicion
  868.      */
  869.     public function setInicio($inicio)
  870.     {
  871.         if (empty($inicio))
  872.             return $this;
  873.         $this->inicio $inicio;
  874.         return $this;
  875.     }
  876.     /**
  877.      * Get inicio
  878.      *
  879.      * @return \DateTime
  880.      */
  881.     public function getInicio()
  882.     {
  883.         $fecha $this->inicio;
  884.         if (!is_null($this->getClub()) && !is_null($this->getClub()->getTimezone())) {
  885.             $timezone = new \DateTimeZone($this->getClub()->getTimezone()->getNombre());
  886.             if (!is_null($timezone) && !is_null($fecha)) {
  887.                 $fecha->setTimezone($timezone);
  888.             }
  889.         }
  890.         return $fecha;
  891.     }
  892.     /**
  893.      * Set fin
  894.      *
  895.      * @param \DateTime $fin
  896.      * @return Competicion
  897.      */
  898.     public function setFin($fin)
  899.     {
  900.         if (empty($fin))
  901.             return $this;
  902.         $this->fin $fin;
  903.         return $this;
  904.     }
  905.     /**
  906.      * Get fin
  907.      *
  908.      * @return \DateTime
  909.      */
  910.     public function getFin()
  911.     {
  912.         $fecha $this->fin;
  913.         if (!is_null($this->getClub()) && !is_null($this->getClub()->getTimezone())) {
  914.             $timezone = new \DateTimeZone($this->getClub()->getTimezone()->getNombre());
  915.             if (!is_null($timezone) && !is_null($fecha)) {
  916.                 $fecha->setTimezone($timezone);
  917.             }
  918.         }
  919.         return $fecha;
  920.     }
  921.     /**
  922.      * Set plazas
  923.      *
  924.      * @param integer $plazas
  925.      * @return Competicion
  926.      */
  927.     public function setPlazas($plazas)
  928.     {
  929.         $this->plazas $plazas;
  930.         return $this;
  931.     }
  932.     /**
  933.      * Get plazas
  934.      *
  935.      * @return integer
  936.      */
  937.     public function getPlazas()
  938.     {
  939.         return $this->plazas;
  940.     }
  941.     /**
  942.      * Set jugadores
  943.      *
  944.      * @param integer $jugadores
  945.      * @return Competicion
  946.      */
  947.     public function setJugadores($jugadores)
  948.     {
  949.         $this->jugadores $jugadores;
  950.         return $this;
  951.     }
  952.     /**
  953.      * Get jugadores
  954.      *
  955.      * @return integer
  956.      */
  957.     public function getJugadores()
  958.     {
  959.         return $this->jugadores;
  960.     }
  961.     /**
  962.      * Set estricto
  963.      *
  964.      * @param boolean $estricto
  965.      * @return Competicion
  966.      */
  967.     public function setEstricto($estricto)
  968.     {
  969.         $this->estricto $estricto;
  970.         return $this;
  971.     }
  972.     /**
  973.      * Get estricto
  974.      *
  975.      * @return boolean
  976.      */
  977.     public function getEstricto()
  978.     {
  979.         return $this->estricto;
  980.     }
  981.     /**
  982.      * Set observaciones
  983.      *
  984.      * @param string $observaciones
  985.      * @return Competicion
  986.      */
  987.     public function setObservaciones($observaciones)
  988.     {
  989.         $this->observaciones $observaciones;
  990.         return $this;
  991.     }
  992.     /**
  993.      * Get observaciones
  994.      *
  995.      * @return string
  996.      */
  997.     public function getObservaciones()
  998.     {
  999.         return $this->observaciones;
  1000.     }
  1001.     /**
  1002.      * Set aviso
  1003.      *
  1004.      * @param string $aviso
  1005.      * @return Competicion
  1006.      */
  1007.     public function setAviso($aviso)
  1008.     {
  1009.         $this->aviso $aviso;
  1010.         return $this;
  1011.     }
  1012.     /**
  1013.      * Get aviso
  1014.      *
  1015.      * @return string
  1016.      */
  1017.     public function getAviso()
  1018.     {
  1019.         return $this->aviso;
  1020.     }
  1021.     /**
  1022.      * Set created_at
  1023.      *
  1024.      * @param \DateTime $createdAt
  1025.      * @return Competicion
  1026.      */
  1027.     public function setCreatedAt($createdAt)
  1028.     {
  1029.         $this->created_at $createdAt;
  1030.         return $this;
  1031.     }
  1032.     /**
  1033.      * Get created_at
  1034.      *
  1035.      * @return \DateTime
  1036.      */
  1037.     public function getCreatedAt()
  1038.     {
  1039.         return $this->created_at;
  1040.     }
  1041.     /**
  1042.      * Set updated_at
  1043.      *
  1044.      * @param \DateTime $updatedAt
  1045.      * @return Competicion
  1046.      */
  1047.     public function setUpdatedAt($updatedAt)
  1048.     {
  1049.         $this->updated_at $updatedAt;
  1050.         return $this;
  1051.     }
  1052.     /**
  1053.      * Get updated_at
  1054.      *
  1055.      * @return \DateTime
  1056.      */
  1057.     public function getUpdatedAt()
  1058.     {
  1059.         return $this->updated_at;
  1060.     }
  1061.     /**
  1062.      * Set rfeg_id
  1063.      *
  1064.      * @param integer $rfegId
  1065.      * @return Competicion
  1066.      */
  1067.     public function setRfegId($rfegId)
  1068.     {
  1069.         $this->rfeg_id $rfegId;
  1070.         return $this;
  1071.     }
  1072.     /**
  1073.      * Get rfeg_id
  1074.      *
  1075.      * @return integer
  1076.      */
  1077.     public function getRfegId()
  1078.     {
  1079.         return $this->rfeg_id;
  1080.     }
  1081.     /**
  1082.      * Set circular
  1083.      *
  1084.      * @param string $circular
  1085.      * @return Competicion
  1086.      */
  1087.     public function setCircular($circular)
  1088.     {
  1089.         $this->circular $circular;
  1090.         return $this;
  1091.     }
  1092.     /**
  1093.      * Get circular
  1094.      *
  1095.      * @return string
  1096.      */
  1097.     public function getCircular()
  1098.     {
  1099.         return $this->circular;
  1100.     }
  1101.     /**
  1102.      * Set nombre_observaciones
  1103.      *
  1104.      * @param string $nombreObservaciones
  1105.      * @return Competicion
  1106.      */
  1107.     public function setNombreObservaciones($nombreObservaciones)
  1108.     {
  1109.         $this->nombre_observaciones $nombreObservaciones;
  1110.         return $this;
  1111.     }
  1112.     /**
  1113.      * Get nombre_observaciones
  1114.      *
  1115.      * @return string
  1116.      */
  1117.     public function getNombreObservaciones()
  1118.     {
  1119.         return $this->nombre_observaciones;
  1120.     }
  1121.     /**
  1122.      * Set destacada
  1123.      *
  1124.      * @param \App\Entity\Backend\Destacada $destacada
  1125.      * @return Competicion
  1126.      */
  1127.     public function setDestacada(\App\Entity\Backend\Destacada $destacada null)
  1128.     {
  1129.         $this->destacada $destacada;
  1130.         return $this;
  1131.     }
  1132.     /**
  1133.      * Get destacada
  1134.      *
  1135.      * @return \App\Entity\Backend\Destacada
  1136.      */
  1137.     public function getDestacada()
  1138.     {
  1139.         return $this->destacada;
  1140.     }
  1141.     /**
  1142.      * Set formula
  1143.      *
  1144.      * @param \App\Entity\Backend\Formula $formula
  1145.      * @return Competicion
  1146.      */
  1147.     public function setFormula(\App\Entity\Backend\Formula $formula null)
  1148.     {
  1149.         $this->formula $formula;
  1150.         return $this;
  1151.     }
  1152.     /**
  1153.      * Get formula
  1154.      *
  1155.      * @return \App\Entity\Backend\Formula
  1156.      */
  1157.     public function getFormula()
  1158.     {
  1159.         return $this->formula;
  1160.     }
  1161.     /**
  1162.      * Set calculo
  1163.      *
  1164.      * @param \App\Entity\Backend\Calculo $calculo
  1165.      * @return Competicion
  1166.      */
  1167.     public function setCalculo(\App\Entity\Backend\Calculo $calculo null)
  1168.     {
  1169.         $this->calculo $calculo;
  1170.         return $this;
  1171.     }
  1172.     /**
  1173.      * Get calculo
  1174.      *
  1175.      * @return \App\Entity\Backend\Calculo
  1176.      */
  1177.     public function getCalculo()
  1178.     {
  1179.         return $this->calculo;
  1180.     }
  1181.     /**
  1182.      * Set club
  1183.      *
  1184.      * @param \App\Entity\Backend\Club $club
  1185.      * @return Competicion
  1186.      */
  1187.     public function setClub(\App\Entity\Backend\Club $club null)
  1188.     {
  1189.         $this->club $club;
  1190.         return $this;
  1191.     }
  1192.     /**
  1193.      * Get club
  1194.      *
  1195.      * @return \App\Entity\Backend\Club
  1196.      */
  1197.     public function getClub()
  1198.     {
  1199.         return $this->club;
  1200.     }
  1201.     /**
  1202.      * Set organizador
  1203.      *
  1204.      * @param \App\Entity\Backend\Club $organizador
  1205.      * @return Competicion
  1206.      */
  1207.     public function setOrganizador(\App\Entity\Backend\Club $organizador null)
  1208.     {
  1209.         $this->organizador $organizador;
  1210.         return $this;
  1211.     }
  1212.     /**
  1213.      * Get organizador
  1214.      *
  1215.      * @return \App\Entity\Backend\Club
  1216.      */
  1217.     public function getOrganizador()
  1218.     {
  1219.         return $this->organizador;
  1220.     }
  1221.     /**
  1222.      * Set albaran
  1223.      *
  1224.      * @param \App\Entity\Backend\Albaran $albaran
  1225.      * @return Competicion
  1226.      */
  1227.     public function setAlbaran(\App\Entity\Backend\Albaran $albaran null)
  1228.     {
  1229.         $this->albaran $albaran;
  1230.         return $this;
  1231.     }
  1232.     /**
  1233.      * Get albaran
  1234.      *
  1235.      * @return \App\Entity\Backend\Albaran
  1236.      */
  1237.     public function getAlbaran()
  1238.     {
  1239.         return $this->albaran;
  1240.     }
  1241.     /**
  1242.      * Set criterio
  1243.      *
  1244.      * @param \App\Entity\Backend\Criterio $criterio
  1245.      * @return Competicion
  1246.      */
  1247.     public function setCriterio(\App\Entity\Backend\Criterio $criterio null)
  1248.     {
  1249.         $this->criterio $criterio;
  1250.         return $this;
  1251.     }
  1252.     /**
  1253.      * Get criterio
  1254.      *
  1255.      * @return \App\Entity\Backend\Criterio
  1256.      */
  1257.     public function getCriterio()
  1258.     {
  1259.         return $this->criterio;
  1260.     }
  1261.     /**
  1262.      *
  1263.      * @ORM\PrePersist
  1264.      * @ORM\PreUpdate
  1265.      */
  1266.     public function updatedTimestamps()
  1267.     {
  1268.         $this->setUpdatedAt(new \DateTime('now'));
  1269.         //Is is new
  1270.         if ($this->getCreatedAt() == null) {
  1271.             $this->setCreatedAt(new \DateTime('now'));
  1272.         }
  1273.     }
  1274.     /**
  1275.      * Add comites
  1276.      *
  1277.      * @param \App\Entity\Backend\Comite $comites
  1278.      * @return Competicion
  1279.      */
  1280.     public function addComite(\App\Entity\Backend\Comite $comites)
  1281.     {
  1282.         $this->comites[] = $comites;
  1283.         return $this;
  1284.     }
  1285.     /**
  1286.      * Remove comites
  1287.      *
  1288.      * @param \App\Entity\Backend\Comite $comites
  1289.      */
  1290.     public function removeComite(\App\Entity\Backend\Comite $comites)
  1291.     {
  1292.         $this->comites->removeElement($comites);
  1293.     }
  1294.     /**
  1295.      * Get comites
  1296.      *
  1297.      * @return \Doctrine\Common\Collections\Collection
  1298.      */
  1299.     public function getComites()
  1300.     {
  1301.         return $this->comites;
  1302.     }
  1303.     /**
  1304.      * Set comites
  1305.      *
  1306.      * @param \Doctrine\Common\Collections\ArrayCollection $comites
  1307.      * @return Competicion
  1308.      */
  1309.     public function setComites($comites)
  1310.     {
  1311.         $this->comites $comites;
  1312.         return $this->comites;
  1313.     }
  1314.     /**
  1315.      * Add circuitos
  1316.      *
  1317.      * @param \App\Entity\Backend\Circuito $circuitos
  1318.      * @return Competicion
  1319.      */
  1320.     public function addCircuito(\App\Entity\Backend\Circuito $circuitos)
  1321.     {
  1322.         $this->circuitos[] = $circuitos;
  1323.         return $this;
  1324.     }
  1325.     /**
  1326.      * Remove circuitos
  1327.      *
  1328.      * @param \App\Entity\Backend\Circuito $circuitos
  1329.      */
  1330.     public function removeCircuito(\App\Entity\Backend\Circuito $circuitos)
  1331.     {
  1332.         $this->circuitos->removeElement($circuitos);
  1333.     }
  1334.     /**
  1335.      * Get circuitos
  1336.      *
  1337.      * @return \Doctrine\Common\Collections\Collection
  1338.      */
  1339.     public function getCircuitos()
  1340.     {
  1341.         return $this->circuitos;
  1342.     }
  1343.     /**
  1344.      * Set circuitos
  1345.      *
  1346.      * @param \Doctrine\Common\Collections\ArrayCollection $circuitos
  1347.      * @return Competicion
  1348.      */
  1349.     public function setCircuitos($circuitos)
  1350.     {
  1351.         $this->circuitos $circuitos;
  1352.         return $this->circuitos;
  1353.     }
  1354.     /**
  1355.      * Set estado
  1356.      *
  1357.      * @param enumestadocompeticion $estado
  1358.      * @return Competicion
  1359.      */
  1360.     public function setEstado($estado)
  1361.     {
  1362.         $this->estado $estado;
  1363.         return $this;
  1364.     }
  1365.     /**
  1366.      * Get estado
  1367.      *
  1368.      * @return enumestadocompeticion
  1369.      */
  1370.     public function getEstado()
  1371.     {
  1372.         return $this->estado;
  1373.     }
  1374.     /**
  1375.      * Set hash
  1376.      *
  1377.      * @param string $hash
  1378.      * @return Competicion
  1379.      */
  1380.     public function setHash($hash)
  1381.     {
  1382.         $this->hash $hash;
  1383.         return $this;
  1384.     }
  1385.     /**
  1386.      * Get hash
  1387.      *
  1388.      * @return string
  1389.      */
  1390.     public function getHash()
  1391.     {
  1392.         return $this->hash;
  1393.     }
  1394.     /**
  1395.      * Set estado_corte
  1396.      *
  1397.      * @param enumestadocorte $estadoCorte
  1398.      * @return Competicion
  1399.      */
  1400.     public function setEstadoCorte($estadoCorte)
  1401.     {
  1402.         $this->estado_corte $estadoCorte;
  1403.         return $this;
  1404.     }
  1405.     /**
  1406.      * Get estado_corte
  1407.      *
  1408.      * @return enumestadocorte
  1409.      */
  1410.     public function getEstadoCorte()
  1411.     {
  1412.         return $this->estado_corte;
  1413.     }
  1414.     public function __toString()
  1415.     {
  1416.         return (string)$this->getNombre() . " - " $this->getFecha()->format('d/m/Y');
  1417.     }
  1418.     /**
  1419.      * Get jornadas
  1420.      *
  1421.      */
  1422.     public function getJornadas()
  1423.     {
  1424.         return $this->jornadas;
  1425.     }
  1426.     /**
  1427.      * Set jornadas
  1428.      *
  1429.      * @param \Doctrine\Common\Collections\ArrayCollection $jornadas
  1430.      * @return Competicion
  1431.      */
  1432.     public function setJornadas($jornadas)
  1433.     {
  1434.         $this->jornadas $jornadas;
  1435.         return $this->jornadas;
  1436.     }
  1437.     /**
  1438.      * Add jornada
  1439.      *
  1440.      * @param \App\Entity\Backend\Jornada $jornada
  1441.      * @return Competicion
  1442.      */
  1443.     public function addJornada(\App\Entity\Backend\Jornada $jornada)
  1444.     {
  1445.         $jornada->getCompeticion($this);
  1446.         $this->jornadas->add($jornada);
  1447.         return $this;
  1448.     }
  1449.     /**
  1450.      * Delete jornadas
  1451.      *
  1452.      * @param \App\Entity\Backend\Jornada $jornadas
  1453.      * @return Competicion
  1454.      */
  1455.     public function removeJornada(\App\Entity\Backend\Jornada $jornadas)
  1456.     {
  1457.         $this->jornadas->removeElement($jornadas);
  1458.         return $this;
  1459.     }
  1460.     /**
  1461.      * @param bool $hastaHoy Solo se comprueban las jornadas de hoy para atrás
  1462.      * @return bool
  1463.      */
  1464.     public function getJornadasCompatibles($hastaHoy true): bool
  1465.     {
  1466.         // Se recogen todas las modalidades de la competicion
  1467.         $modalidades = [];
  1468.         $now = new \DateTime('today 23:59:59');
  1469.         foreach ($this->jornadas as $jornada) {
  1470.             if (($hastaHoy && $jornada->getFecha() <= $now) || !$hastaHoy) {
  1471.                 $modalidades[] = $jornada->getModalidad()->getId();
  1472.             }
  1473.         }
  1474.         // Son compatibles si todas las modalidades son individual
  1475.         $todasIndividual count(array_filter($modalidades, function ($modalidadId) {
  1476.                 return $modalidadId === "I";
  1477.             })) === count($modalidades);
  1478.         if ($todasIndividual) {
  1479.             return true;
  1480.         }
  1481.         $gruposCompatibles = [
  1482.             ["C""F""G""H""P"],
  1483.             ["A""S"]
  1484.         ];
  1485.         if (empty(array_diff($modalidades$gruposCompatibles[0])) || empty(array_diff($modalidades$gruposCompatibles[1]))) {
  1486.             return true;
  1487.         }
  1488.         return false;
  1489.     }
  1490.     /**
  1491.      * Add inscritos
  1492.      *
  1493.      * @param \App\Entity\Backend\Inscrito $inscritos
  1494.      * @return Competicion
  1495.      */
  1496.     public function addInscrito(\App\Entity\Backend\Inscrito $inscritos)
  1497.     {
  1498.         $this->inscritos[] = $inscritos;
  1499.         return $this;
  1500.     }
  1501.     /**
  1502.      * Remove inscritos
  1503.      *
  1504.      * @param \App\Entity\Backend\Inscrito $inscritos
  1505.      */
  1506.     public function removeInscrito(\App\Entity\Backend\Inscrito $inscritos)
  1507.     {
  1508.         $this->inscritos->removeElement($inscritos);
  1509.     }
  1510.     /**
  1511.      * Get inscritos
  1512.      *
  1513.      * @return \Doctrine\Common\Collections\Collection
  1514.      */
  1515.     public function getInscritos()
  1516.     {
  1517.         return $this->inscritos;
  1518.     }
  1519.     /**
  1520.      * Add categorias
  1521.      *
  1522.      * @param \App\Entity\Backend\Categoria $categorias
  1523.      * @return Competicion
  1524.      */
  1525.     public function addCategoria(\App\Entity\Backend\Categoria $categorias)
  1526.     {
  1527.         $this->categorias[] = $categorias;
  1528.         return $this;
  1529.     }
  1530.     /**
  1531.      * Remove categorias
  1532.      *
  1533.      * @param \App\Entity\Backend\Categoria $categorias
  1534.      */
  1535.     public function removeCategoria(\App\Entity\Backend\Categoria $categorias)
  1536.     {
  1537.         $this->categorias->removeElement($categorias);
  1538.     }
  1539.     /**
  1540.      * Get categorias
  1541.      *
  1542.      * @return \Doctrine\Common\Collections\Collection
  1543.      */
  1544.     public function getCategorias()
  1545.     {
  1546.         return $this->categorias;
  1547.     }
  1548.     /**
  1549.      * Add tarifas
  1550.      *
  1551.      * @param \App\Entity\Backend\Tarifa $tarifa
  1552.      * @return Competicion
  1553.      */
  1554.     public function addTarifa(\App\Entity\Backend\Tarifa $tarifa)
  1555.     {
  1556.         $tarifa->setCompeticion($this);
  1557.         $this->tarifas[] = $tarifa;
  1558.         return $this;
  1559.     }
  1560.     /**
  1561.      * Remove tarifas
  1562.      *
  1563.      * @param \App\Entity\Backend\Tarifa $tarifa
  1564.      */
  1565.     public function removeTarifa(\App\Entity\Backend\Tarifa $tarifa)
  1566.     {
  1567.         $this->tarifas->removeElement($tarifa);
  1568.         $tarifa->removeCompeticion();
  1569.     }
  1570.     /**
  1571.      * Get tarifa
  1572.      *
  1573.      * @return array
  1574.      */
  1575.     public function getTarifas()
  1576.     {
  1577.         return $this->tarifas;
  1578.     }
  1579.     /**
  1580.      * Set tarifas
  1581.      *
  1582.      * @param \Doctrine\Common\Collections\ArrayCollection $tarifas
  1583.      * @return Competicion
  1584.      */
  1585.     public function setTarifas($tarifas)
  1586.     {
  1587.         $this->tarifas $tarifas;
  1588.         return $this;
  1589.     }
  1590.     /**
  1591.      * Set cartel
  1592.      *
  1593.      * @param string $cartel
  1594.      * @return Competicion
  1595.      */
  1596.     public function setCartel($cartel)
  1597.     {
  1598.         $this->cartel $cartel;
  1599.         return $this;
  1600.     }
  1601.     /**
  1602.      * Get cartel
  1603.      *
  1604.      * @return string
  1605.      */
  1606.     public function getCartel()
  1607.     {
  1608.         return $this->cartel;
  1609.     }
  1610.     public function getFileCartel()
  1611.     {
  1612.         return $this->file_cartel;
  1613.     }
  1614.     public function getFileHorario()
  1615.     {
  1616.         return $this->file_horario;
  1617.     }
  1618.     public function getFileInscritos()
  1619.     {
  1620.         return $this->file_inscritos;
  1621.     }
  1622.     public function getFileClasificaciones()
  1623.     {
  1624.         return $this->file_clasificaciones;
  1625.     }
  1626.     public function getFileBannerSchedule()
  1627.     {
  1628.         return $this->file_banner_schedule;
  1629.     }
  1630.     public function getFileLocaleRulePdf()
  1631.     {
  1632.         return $this->file_localeRulePdf;
  1633.     }
  1634.     public function getFileReglas()
  1635.     {
  1636.         return $this->file_reglas;
  1637.     }
  1638.     public function getFileVarios()
  1639.     {
  1640.         return $this->file_varios;
  1641.     }
  1642.     public function getAbsolutePath($fichero)
  1643.     {
  1644.         switch ($fichero) {
  1645.             case "cartel":
  1646.                 return null === $this->cartel null $this->getUploadRootDir() . '/' $this->cartel;
  1647.             case "horario":
  1648.                 return null === $this->horario null $this->getUploadRootDir() . '/' $this->horario;
  1649.             case "fichero_inscritos":
  1650.                 return null === $this->fichero_inscritos null $this->getUploadRootDir() . '/' $this->fichero_inscritos;
  1651.             case "fichero_clasificaciones":
  1652.                 return null === $this->fichero_clasificaciones null $this->getUploadRootDir() . '/' $this->fichero_clasificaciones;
  1653.             case "fichero_banner_schedule":
  1654.                 return null === $this->fichero_banner_schedule null $this->getUploadRootDir("image") . '/' $this->fichero_banner_schedule;
  1655.             case "fichero_localeRulePdf":
  1656.                 return null === $this->fichero_localeRulePdf null $this->getUploadRootDir() . '/' $this->fichero_localeRulePdf;
  1657.             case "fichero_reglas":
  1658.                 return null === $this->fichero_reglas null $this->getUploadRootDir() . '/' $this->fichero_reglas;
  1659.             case "fichero_varios":
  1660.                 return null === $this->fichero_varios null $this->getUploadRootDir() . '/' $this->fichero_varios;
  1661.         }
  1662.     }
  1663.     public function getWebPath()
  1664.     {
  1665.         return null === $this->cartel null $this->getUploadDir() . '/' $this->cartel;
  1666.     }
  1667.     protected function getUploadRootDir(string $type "pdf")
  1668.     {
  1669.         // la ruta absoluta del directorio donde se deben guardar los archivos cargados
  1670.         return __DIR__ '/../../../public/' $this->getUploadDir($type);
  1671.     }
  1672.     protected function getUploadDir(string $type "pdf")
  1673.     {
  1674.         // se libra del __DIR__ para no desviarse al mostrar `doc/image` en la vista.
  1675.         return "uploads/competiciones/$type";
  1676.     }
  1677.     /**
  1678.      * Renames uploaded file
  1679.      * @return string
  1680.      */
  1681.     public function preUpload()
  1682.     {
  1683.         if (null !== $this->getFileCartel()) {
  1684.             // haz cualquier cosa para generar un nombre Ãºnico
  1685.             $this->cartel abs(crc32(rand() . "_" uniqid('archC_'))) . '_' UtilStatic::normaliza($this->getFileCartel()->getClientOriginalName());
  1686.         }
  1687.         if (null !== $this->getFileHorario()) {
  1688.             // haz cualquier cosa para generar un nombre Ãºnico
  1689.             $this->horario abs(crc32(rand() . "_" uniqid('archH_'))) . '_' UtilStatic::normaliza($this->getFileHorario()->getClientOriginalName());
  1690.         }
  1691.         if (null !== $this->getFileInscritos()) {
  1692.             // haz cualquier cosa para generar un nombre Ãºnico
  1693.             $this->fichero_inscritos abs(crc32(rand() . "_" uniqid('archI_'))) . '_' UtilStatic::normaliza($this->getFileInscritos()->getClientOriginalName());
  1694.         }
  1695.         if (null !== $this->getFileClasificaciones()) {
  1696.             // haz cualquier cosa para generar un nombre Ãºnico
  1697.             $this->fichero_clasificaciones abs(crc32(rand() . "_" uniqid('archL_'))) . '_' UtilStatic::normaliza($this->getFileClasificaciones()->getClientOriginalName());
  1698.         }
  1699.         if (null !== $this->getFileLocaleRulePdf()) {
  1700.             // haz cualquier cosa para generar un nombre Ãºnico
  1701.             $this->fichero_localeRulePdf abs(crc32(rand() . "_" uniqid('archL_'))) . '_' UtilStatic::normaliza($this->getFileLocaleRulePdf()->getClientOriginalName());
  1702.         }
  1703.         if (null !== $this->getFileBannerSchedule()) {
  1704.             // haz cualquier cosa para generar un nombre Ãºnico
  1705.             $this->fichero_banner_schedule abs(crc32(rand() . "_" uniqid('archL_'))) . '_' UtilStatic::normaliza($this->getFileBannerSchedule()->getClientOriginalName());
  1706.         }
  1707.         if (null !== $this->getFileReglas()) {
  1708.             // haz cualquier cosa para generar un nombre Ãºnico
  1709.             $this->fichero_reglas abs(crc32(rand() . "_" uniqid('archR_'))) . '_' UtilStatic::normaliza($this->getFileReglas()->getClientOriginalName());
  1710.         }
  1711.         if (null !== $this->getFileVarios()) {
  1712.             // haz cualquier cosa para generar un nombre Ãºnico
  1713.             $this->fichero_varios abs(crc32(rand() . "_" uniqid('archV_'))) . '_' UtilStatic::normaliza($this->getFileVarios()->getClientOriginalName());
  1714.         }
  1715.         if (!empty($this->inicio) && ($this->inicio->getTimezone()->getName() !== $_ENV['DEFAULT_TIMEZONE'])) {
  1716.             $this->inicio->setTimezone(new \DateTimeZone($_ENV['DEFAULT_TIMEZONE']));
  1717.         }
  1718.         if (!empty($this->fin) && ($this->fin->getTimezone()->getName() !== $_ENV['DEFAULT_TIMEZONE'])) {
  1719.             $this->fin->setTimezone(new \DateTimeZone($_ENV['DEFAULT_TIMEZONE']));
  1720.         }
  1721.     }
  1722.     /**
  1723.      * @ORM\PostPersist()
  1724.      * @ORM\PostUpdate()
  1725.      */
  1726.     public function upload()
  1727.     {
  1728.         // TODO revisar si esto hay que quitarlo o que pasa con esto, porque se ha cambiado la implementacion del cartel
  1729.         if (!is_null($this->getFileCartel())) {
  1730.             // si hay un error al mover el archivo, move() automáticamente
  1731.             // envía una excepción. Esta impedirá que la entidad se persista
  1732.             // en la base de datos en caso de error
  1733.             $this->getFileCartel()->move($this->getUploadRootDir(), $this->cartel);
  1734.             // check if we have an old file
  1735.             if (isset($this->temp_cartel)) {
  1736.                 // delete the old file
  1737.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_cartel);
  1738.                 // clear the temp image path
  1739.                 $this->temp_cartel null;
  1740.             }
  1741.             $this->file_cartel null;
  1742.             $pathCartel $this->getAbsolutePath("cartel");
  1743.             if (substr($pathCartel, -3) == "pdf") {
  1744.                 $im = new \Imagick();
  1745.                 $im->readimage($pathCartel);
  1746.                 $im->setiteratorindex(0);   //primera pagina
  1747.                 $im->setImageFormat('png'); //formato
  1748.                 $im->setcompressionquality(75); //calidad
  1749.                 $im->scaleImage(100100true);
  1750.                 $im->writeimage(substr($pathCartel0, -3) . "png");  //usamos substring para quitar la extension
  1751.                 $im->destroy();
  1752.             }
  1753.         }
  1754.         if (!is_null($this->getFileHorario())) {
  1755.             // si hay un error al mover el archivo, move() automáticamente
  1756.             // envía una excepción. Esta impedirá que la entidad se persista
  1757.             // en la base de datos en caso de error
  1758.             $this->getFileHorario()->move($this->getUploadRootDir(), $this->horario);
  1759.             // check if we have an old file
  1760.             if (isset($this->temp_horario)) {
  1761.                 // delete the old file
  1762.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_horario);
  1763.                 // clear the temp image path
  1764.                 $this->temp_horario null;
  1765.             }
  1766.             $this->file_horario null;
  1767.         }
  1768.         if (!is_null($this->getFileInscritos())) {
  1769.             // si hay un error al mover el archivo, move() automáticamente
  1770.             // envía una excepción. Esta impedirá que la entidad se persista
  1771.             // en la base de datos en caso de error
  1772.             $this->getFileInscritos()->move($this->getUploadRootDir(), $this->fichero_inscritos);
  1773.             // check if we have an old file
  1774.             if (isset($this->temp_inscritos)) {
  1775.                 // delete the old file
  1776.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_inscritos);
  1777.                 // clear the temp image path
  1778.                 $this->temp_inscritos null;
  1779.             }
  1780.             $this->file_inscritos null;
  1781.         }
  1782.         if (!is_null($this->getFileClasificaciones())) {
  1783.             // si hay un error al mover el archivo, move() automáticamente
  1784.             // envía una excepción. Esta impedirá que la entidad se persista
  1785.             // en la base de datos en caso de error
  1786.             $this->getFileClasificaciones()->move($this->getUploadRootDir(), $this->fichero_clasificaciones);
  1787.             // check if we have an old file
  1788.             if (isset($this->temp_clasificaciones)) {
  1789.                 // delete the old file
  1790.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_clasificaciones);
  1791.                 // clear the temp image path
  1792.                 $this->temp_clasificaciones null;
  1793.             }
  1794.             $this->file_clasificaciones null;
  1795.         }
  1796.         if (!is_null($this->getFileLocaleRulePdf())) {
  1797.             // si hay un error al mover el archivo, move() automáticamente
  1798.             // envía una excepción. Esta impedirá que la entidad se persista
  1799.             // en la base de datos en caso de error
  1800.             $this->getFileLocaleRulePdf()->move($this->getUploadRootDir(), $this->fichero_localeRulePdf);
  1801.             // check if we have an old file
  1802.             if (isset($this->temp_localeRulePdf)) {
  1803.                 // delete the old file
  1804.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_localeRulePdf);
  1805.                 // clear the temp image path
  1806.                 $this->temp_localeRulePdf null;
  1807.             }
  1808.             $this->file_localeRulePdf null;
  1809.         }
  1810.         if (!is_null($this->getFileBannerSchedule())) {
  1811.             // si hay un error al mover el archivo, move() automáticamente
  1812.             // envía una excepción. Esta impedirá que la entidad se persista
  1813.             // en la base de datos en caso de error
  1814.             $this->getFileBannerSchedule()->move($this->getUploadRootDir("image"), $this->fichero_banner_schedule);
  1815.             // check if we have an old file
  1816.             if (isset($this->temp_banner_schedule)) {
  1817.                 // delete the old file
  1818.                 $this->unlinkIfExist($this->getUploadRootDir("image") . '/' $this->temp_banner_schedule);
  1819.                 // clear the temp image path
  1820.                 $this->temp_banner_schedule null;
  1821.             }
  1822.             $this->file_banner_schedule null;
  1823.         }
  1824.         if (!is_null($this->getFileReglas())) {
  1825.             // si hay un error al mover el archivo, move() automáticamente
  1826.             // envía una excepción. Esta impedirá que la entidad se persista
  1827.             // en la base de datos en caso de error
  1828.             $this->getFileReglas()->move($this->getUploadRootDir(), $this->fichero_reglas);
  1829.             // check if we have an old file
  1830.             if (isset($this->temp_reglas)) {
  1831.                 // delete the old file
  1832.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_reglas);
  1833.                 // clear the temp image path
  1834.                 $this->temp_reglas null;
  1835.             }
  1836.             $this->file_reglas null;
  1837.         }
  1838.         if (!is_null($this->getFileVarios())) {
  1839.             // si hay un error al mover el archivo, move() automáticamente
  1840.             // envía una excepción. Esta impedirá que la entidad se persista
  1841.             // en la base de datos en caso de error
  1842.             $this->getFileVarios()->move($this->getUploadRootDir(), $this->fichero_varios);
  1843.             // check if we have an old file
  1844.             if (isset($this->temp_varios)) {
  1845.                 // delete the old file
  1846.                 $this->unlinkIfExist($this->getUploadRootDir() . '/' $this->temp_varios);
  1847.                 // clear the temp image path
  1848.                 $this->temp_varios null;
  1849.             }
  1850.             $this->file_varios null;
  1851.         }
  1852.     }
  1853.     /**
  1854.      * Defaults when inserting a user
  1855.      * @ORM\PrePersist()
  1856.      */
  1857.     public function prePersistTasks()
  1858.     {
  1859.         $this->preUpload();
  1860.     }
  1861.     /**
  1862.      * Defaults when updating a user
  1863.      * @ORM\PreUpdate()
  1864.      */
  1865.     public function preUpdateTasks()
  1866.     {
  1867.         $this->preUpload();
  1868.     }
  1869.     /**
  1870.      * @ORM\PostRemove()
  1871.      */
  1872.     public function removeUpload($fichero)
  1873.     {
  1874.         switch ($fichero) {
  1875.             case "cartel":
  1876.                 if ($file_cartel $this->getAbsolutePath('cartel')) {
  1877.                     unlink($file_cartel);
  1878.                     $this->setCartel(null);
  1879.                 }
  1880.                 break;
  1881.             case "horario":
  1882.                 if ($file_horario $this->getAbsolutePath('horario')) {
  1883.                     unlink($file_horario);
  1884.                     $this->setHorario(null);
  1885.                 }
  1886.                 break;
  1887.             case "fichero_inscritos":
  1888.                 if ($file_inscritos $this->getAbsolutePath('fichero_inscritos')) {
  1889.                     unlink($file_inscritos);
  1890.                     $this->setFicheroInscritos(null);
  1891.                 }
  1892.                 break;
  1893.             case "fichero_clasificaciones":
  1894.                 if ($file_clasificaciones $this->getAbsolutePath('fichero_clasificaciones')) {
  1895.                     unlink($file_clasificaciones);
  1896.                     $this->setFicheroClasificaciones(null);
  1897.                 }
  1898.                 break;
  1899.             case "fichero_localeRulePdf":
  1900.                 if ($file_localeRulePdf $this->getAbsolutePath('fichero_localeRulePdf')) {
  1901.                     unlink($file_localeRulePdf);
  1902.                     $this->setFicheroLocaleRulePdf(null);
  1903.                 }
  1904.                 break;
  1905.             case "fichero_banner_schedule":
  1906.                 if ($file_banner_schedule $this->getAbsolutePath('fichero_banner_schedule')) {
  1907.                     unlink($file_banner_schedule);
  1908.                     $this->setFicheroBannerSchedule(null);
  1909.                 }
  1910.                 break;
  1911.             case "fichero_reglas":
  1912.                 if ($file_reglas $this->getAbsolutePath('fichero_reglas')) {
  1913.                     unlink($file_reglas);
  1914.                     $this->setFicheroReglas(null);
  1915.                 }
  1916.                 break;
  1917.             case "fichero_varios":
  1918.                 if ($file_varios $this->getAbsolutePath('fichero_varios')) {
  1919.                     unlink($file_varios);
  1920.                     $this->setFicheroVarios(null);
  1921.                 }
  1922.                 break;
  1923.         }
  1924.     }
  1925.     /**
  1926.      * Set horario
  1927.      *
  1928.      * @param string $horario
  1929.      * @return Competicion
  1930.      */
  1931.     public function setHorario($horario)
  1932.     {
  1933.         $this->horario $horario;
  1934.         return $this;
  1935.     }
  1936.     /**
  1937.      * Get horario
  1938.      *
  1939.      * @return string
  1940.      */
  1941.     public function getHorario()
  1942.     {
  1943.         return $this->horario;
  1944.     }
  1945.     /**
  1946.      * Set fichero_inscritos
  1947.      *
  1948.      * @param string $ficheroInscritos
  1949.      * @return Competicion
  1950.      */
  1951.     public function setFicheroInscritos($ficheroInscritos)
  1952.     {
  1953.         $this->fichero_inscritos $ficheroInscritos;
  1954.         return $this;
  1955.     }
  1956.     /**
  1957.      * Get fichero_inscritos
  1958.      *
  1959.      * @return string
  1960.      */
  1961.     public function getFicheroInscritos()
  1962.     {
  1963.         return $this->fichero_inscritos;
  1964.     }
  1965.     public function setFicheroLocaleRulePdf($ficheroLocaleRulePdf)
  1966.     {
  1967.         $this->fichero_localeRulePdf $ficheroLocaleRulePdf;
  1968.         return $this;
  1969.     }
  1970.     public function getFicheroLocaleRulePdf()
  1971.     {
  1972.         return $this->fichero_localeRulePdf;
  1973.     }
  1974.     /**
  1975.      * Set fichero_clasificaciones
  1976.      *
  1977.      * @param string $ficheroClasificaciones
  1978.      * @return Competicion
  1979.      */
  1980.     public function setFicheroClasificaciones($ficheroClasificaciones)
  1981.     {
  1982.         $this->fichero_clasificaciones $ficheroClasificaciones;
  1983.         return $this;
  1984.     }
  1985.     /**
  1986.      * Get fichero_clasificaciones
  1987.      *
  1988.      * @return string
  1989.      */
  1990.     public function getFicheroClasificaciones()
  1991.     {
  1992.         return $this->fichero_clasificaciones;
  1993.     }
  1994.     public function setFicheroBannerSchedule($ficheroBannerSchedule)
  1995.     {
  1996.         $this->fichero_banner_schedule $ficheroBannerSchedule;
  1997.         return $this;
  1998.     }
  1999.     public function getFicheroBannerSchedule()
  2000.     {
  2001.         return $this->fichero_banner_schedule;
  2002.     }
  2003.     /**
  2004.      * Set fichero_reglas
  2005.      *
  2006.      * @param string $ficheroReglas
  2007.      * @return Competicion
  2008.      */
  2009.     public function setFicheroReglas($ficheroReglas)
  2010.     {
  2011.         $this->fichero_reglas $ficheroReglas;
  2012.         return $this;
  2013.     }
  2014.     /**
  2015.      * Get fichero_reglas
  2016.      *
  2017.      * @return string
  2018.      */
  2019.     public function getFicheroReglas()
  2020.     {
  2021.         return $this->fichero_reglas;
  2022.     }
  2023.     /**
  2024.      * Set fichero_varios
  2025.      *
  2026.      * @param string $ficheroVarios
  2027.      * @return Competicion
  2028.      */
  2029.     public function setFicheroVarios($ficheroVarios)
  2030.     {
  2031.         $this->fichero_varios $ficheroVarios;
  2032.         return $this;
  2033.     }
  2034.     /**
  2035.      * Get fichero_varios
  2036.      *
  2037.      * @return string
  2038.      */
  2039.     public function getFicheroVarios()
  2040.     {
  2041.         return $this->fichero_varios;
  2042.     }
  2043.     /**
  2044.      * Set informacion
  2045.      *
  2046.      * @param string $informacion
  2047.      * @return Competicion
  2048.      */
  2049.     public function setInformacion($informacion)
  2050.     {
  2051.         $this->informacion $informacion;
  2052.         return $this;
  2053.     }
  2054.     /**
  2055.      * Get informacion
  2056.      *
  2057.      * @return string
  2058.      */
  2059.     public function getInformacion()
  2060.     {
  2061.         return $this->informacion;
  2062.     }
  2063.     /**
  2064.      * Set modo
  2065.      *
  2066.      * @param \App\Entity\Backend\Modo $modo
  2067.      * @return Competicion
  2068.      */
  2069.     public function setModo(\App\Entity\Backend\Modo $modo null)
  2070.     {
  2071.         $this->modo $modo;
  2072.         return $this;
  2073.     }
  2074.     /**
  2075.      * Get modo
  2076.      *
  2077.      * @return \App\Entity\Backend\Modo
  2078.      */
  2079.     public function getModo()
  2080.     {
  2081.         return $this->modo;
  2082.     }
  2083.     /**
  2084.      * isOnline
  2085.      *
  2086.      * @return boolean
  2087.      */
  2088.     public function isOnline()
  2089.     {
  2090.         return ($this->modo->getId() == 3);
  2091.     }
  2092.     /**
  2093.      * Set criterio2
  2094.      *
  2095.      * @param \App\Entity\Backend\Criterio $criterio2
  2096.      * @return Competicion
  2097.      */
  2098.     public function setCriterio2(\App\Entity\Backend\Criterio $criterio2 null)
  2099.     {
  2100.         $this->criterio2 $criterio2;
  2101.         return $this;
  2102.     }
  2103.     /**
  2104.      * Get criterio2
  2105.      *
  2106.      * @return \App\Entity\Backend\Criterio
  2107.      */
  2108.     public function getCriterio2()
  2109.     {
  2110.         return $this->criterio2;
  2111.     }
  2112.     public function toRfegArray(Util $utilUrlGeneratorInterface $router)
  2113.     {
  2114.         $nombre str_replace(array("'"), array('"'), $this->getNombre());
  2115.         switch ($this->getDestacada()) {
  2116.             case "1":
  2117.             case "2":
  2118.                 $C_Competition_CategTorneo 2;
  2119.                 break;
  2120.             case "3":
  2121.                 $C_Competition_CategTorneo 1;
  2122.                 break;
  2123.             default:
  2124.                 $C_Competition_CategTorneo 3;
  2125.         }
  2126.         $rfeg = array(
  2127.             "C_Competition_Id" => $this->getRfegId(),
  2128.             "C_Competition_Name" => $nombre,
  2129.             "C_Competition_SName" => UtilStatic::limitar_cadena($nombre50),
  2130.             "C_Competition_ClubId" => $this->getClub()->getRfegId(),
  2131.             "C_Competition_StartDate" => $this->getFecha()->format("Y-m-d\TH:i:s"),
  2132.             "C_Competition_EndDate" => $util->getLastJornada($this->getId())->getFecha()->format("Y-m-d\TH:i:s"),
  2133.             "C_Competition_Level" => "Competiciones de Club",
  2134.             "C_Competition_GameStyle" => ($this->getFormula() != null) ? $this->getFormula()->getNombre() : "",
  2135.             "C_Competition_GameMode" => ($this->getJugadores() > 1) ? "Por Equipo" "Individual",
  2136.             "C_Competition_Category" => "1,2,3,4,5,6,7,8,9,10",
  2137.             "C_Competition_Access" => "Abierto",
  2138.             "C_Competition_Sex" => "Mixto",
  2139.             "C_Competition_Web" => $router->generate('_tournament', array('id' => $this->getId()), true),
  2140.             "C_Competition_CategTorneo" => $C_Competition_CategTorneo,
  2141.             "C_Competition_FechaDefinitiva" => 1,
  2142.         );
  2143.         return $rfeg;
  2144.     }
  2145.     /**
  2146.      * Sets file_inscritos.
  2147.      *
  2148.      * @param UploadedFile $file
  2149.      */
  2150.     public function setFileInscritos($file)
  2151.     {
  2152.         $this->file_inscritos $file;
  2153.         // check if we have an old image path
  2154.         if (isset($this->fichero_inscritos)) {
  2155.             // store the old name to delete after the update
  2156.             $this->temp_inscritos $this->fichero_inscritos;
  2157.             $this->fichero_inscritos null;
  2158.         } else {
  2159.             $this->fichero_inscritos '';
  2160.         }
  2161.     }
  2162.     /**
  2163.      * Sets file_reglas.
  2164.      *
  2165.      * @param UploadedFile $file
  2166.      */
  2167.     public function setFileReglas($file)
  2168.     {
  2169.         $this->file_reglas $file;
  2170.         // check if we have an old image path
  2171.         if (isset($this->fichero_reglas)) {
  2172.             // store the old name to delete after the update
  2173.             $this->temp_reglas $this->fichero_reglas;
  2174.             $this->fichero_reglas null;
  2175.         } else {
  2176.             $this->fichero_reglas '';
  2177.         }
  2178.     }
  2179.     /**
  2180.      * Sets file_varios.
  2181.      *
  2182.      * @param UploadedFile $file
  2183.      */
  2184.     public function setFileVarios($file)
  2185.     {
  2186.         $this->file_varios $file;
  2187.         // check if we have an old image path
  2188.         if (isset($this->fichero_varios)) {
  2189.             // store the old name to delete after the update
  2190.             $this->temp_varios $this->fichero_varios;
  2191.             $this->fichero_varios null;
  2192.         } else {
  2193.             $this->fichero_varios '';
  2194.         }
  2195.     }
  2196.     /**
  2197.      * Sets file.
  2198.      *
  2199.      * @param UploadedFile $file
  2200.      */
  2201.     public function setFileClasificaciones($file)
  2202.     {
  2203.         $this->file_clasificaciones $file;
  2204.         // check if we have an old image path
  2205.         if (isset($this->fichero_clasificaciones)) {
  2206.             // store the old name to delete after the update
  2207.             $this->temp_clasificaciones $this->fichero_clasificaciones;
  2208.             $this->fichero_clasificaciones null;
  2209.         } else {
  2210.             $this->fichero_clasificaciones '';
  2211.         }
  2212.     }
  2213.     public function setFileLocaleRulePdf($file)
  2214.     {
  2215.         $this->file_localeRulePdf $file;
  2216.         // check if we have an old image path
  2217.         if (isset($this->fichero_localeRulePdf)) {
  2218.             // store the old name to delete after the update
  2219.             $this->temp_localeRulePdf $this->fichero_localeRulePdf;
  2220.             $this->fichero_localeRulePdf null;
  2221.         } else {
  2222.             $this->fichero_localeRulePdf '';
  2223.         }
  2224.     }
  2225.     public function setFileBannerSchedule($file)
  2226.     {
  2227.         $this->file_banner_schedule $file;
  2228.         // check if we have an old image path
  2229.         if (isset($this->fichero_banner_schedule)) {
  2230.             // store the old name to delete after the update
  2231.             $this->temp_banner_schedule $this->fichero_banner_schedule;
  2232.             $this->fichero_banner_schedule null;
  2233.         } else {
  2234.             $this->fichero_banner_schedule '';
  2235.         }
  2236.     }
  2237.     /**
  2238.      * Sets file.
  2239.      *
  2240.      * @param UploadedFile $file
  2241.      */
  2242.     public function setFileHorario($file)
  2243.     {
  2244.         $this->file_horario $file;
  2245.         // check if we have an old image path
  2246.         if (isset($this->horario)) {
  2247.             // store the old name to delete after the update
  2248.             $this->temp_horario $this->horario;
  2249.             $this->horario null;
  2250.         } else {
  2251.             $this->horario '';
  2252.         }
  2253.     }
  2254.     /**
  2255.      * Sets file.
  2256.      *
  2257.      * @param UploadedFile $file
  2258.      */
  2259.     public function setFileCartel($file)
  2260.     {
  2261.         $this->file_cartel $file;
  2262.         // check if we have an old image path
  2263.         if (isset($this->cartel)) {
  2264.             // store the old name to delete after the update
  2265.             $this->temp_cartel $this->cartel;
  2266.             $this->cartel null;
  2267.         } else {
  2268.             $this->cartel '';
  2269.         }
  2270.     }
  2271.     /**
  2272.      * Set tarifa_reglamento
  2273.      *
  2274.      * @param boolean $tarifaReglamento
  2275.      * @return Competicion
  2276.      */
  2277.     public function setTarifaReglamento($tarifaReglamento)
  2278.     {
  2279.         $this->tarifa_reglamento $tarifaReglamento;
  2280.         return $this;
  2281.     }
  2282.     /**
  2283.      * Get tarifa_reglamento
  2284.      *
  2285.      * @return boolean
  2286.      */
  2287.     public function getTarifaReglamento()
  2288.     {
  2289.         return $this->tarifa_reglamento;
  2290.     }
  2291.     /**
  2292.      * Set redireccion
  2293.      *
  2294.      * @param string $redireccion
  2295.      * @return Competicion
  2296.      */
  2297.     public function setRedireccion($redireccion)
  2298.     {
  2299.         $this->redireccion $redireccion;
  2300.         return $this;
  2301.     }
  2302.     /**
  2303.      * Get redireccion
  2304.      *
  2305.      * @return string
  2306.      */
  2307.     public function getRedireccion()
  2308.     {
  2309.         return $this->redireccion;
  2310.     }
  2311.     /**
  2312.      * Set wagr
  2313.      *
  2314.      * @param boolean $wagr
  2315.      * @return Competicion
  2316.      */
  2317.     public function setWagr($wagr)
  2318.     {
  2319.         $this->wagr $wagr;
  2320.         return $this;
  2321.     }
  2322.     /**
  2323.      * Get wagr
  2324.      *
  2325.      * @return boolean
  2326.      */
  2327.     public function getWagr()
  2328.     {
  2329.         return $this->wagr;
  2330.     }
  2331.     /**
  2332.      * Set sace
  2333.      *
  2334.      * @param boolean $sace
  2335.      * @return Competicion
  2336.      */
  2337.     public function setSace($sace)
  2338.     {
  2339.         $this->sace $sace;
  2340.         return $this;
  2341.     }
  2342.     /**
  2343.      * Get sace
  2344.      *
  2345.      * @return boolean
  2346.      */
  2347.     public function getSace()
  2348.     {
  2349.         return $this->sace;
  2350.     }
  2351.     /**
  2352.      * Set subvencionJunta
  2353.      *
  2354.      * @param boolean $subvencionJunta
  2355.      * @return Competicion
  2356.      */
  2357.     public function setSubvencionJunta($subvencionJunta)
  2358.     {
  2359.         $this->subvencion_junta $subvencionJunta;
  2360.         return $this;
  2361.     }
  2362.     /**
  2363.      * Get subvencionJunta
  2364.      *
  2365.      * @return boolean
  2366.      */
  2367.     public function getSubvencionJunta()
  2368.     {
  2369.         return $this->subvencion_junta;
  2370.     }
  2371.     /**
  2372.      * Set galeria
  2373.      *
  2374.      * @param string $galeria
  2375.      * @return Competicion
  2376.      */
  2377.     public function setGaleria($galeria)
  2378.     {
  2379.         $this->galeria $galeria;
  2380.         return $this;
  2381.     }
  2382.     /**
  2383.      * Get galeria
  2384.      *
  2385.      * @return string
  2386.      */
  2387.     public function getGaleria()
  2388.     {
  2389.         return $this->galeria;
  2390.     }
  2391.     /**
  2392.      * Set informacionPopup
  2393.      *
  2394.      * @param string $informacionPopup
  2395.      * @return Competicion
  2396.      */
  2397.     public function setInformacionPopup($informacionPopup)
  2398.     {
  2399.         $this->informacion_popup $informacionPopup;
  2400.         return $this;
  2401.     }
  2402.     /**
  2403.      * Get informacionPopup
  2404.      *
  2405.      * @return string
  2406.      */
  2407.     public function getInformacionPopup()
  2408.     {
  2409.         return $this->informacion_popup;
  2410.     }
  2411.     /**
  2412.      * Set num_competiciones
  2413.      *
  2414.      * @param integer $numCompeticiones
  2415.      * @return Competicion
  2416.      */
  2417.     public function setNumCompeticiones($numCompeticiones)
  2418.     {
  2419.         $this->num_competiciones $numCompeticiones;
  2420.         return $this;
  2421.     }
  2422.     /**
  2423.      * Get num_competiciones
  2424.      *
  2425.      * @return integer
  2426.      */
  2427.     public function getNumCompeticiones()
  2428.     {
  2429.         return $this->num_competiciones;
  2430.     }
  2431.     /**
  2432.      * Add aspirantes
  2433.      *
  2434.      * @param \App\Entity\Backend\Club $aspirante
  2435.      * @return Competicion
  2436.      */
  2437.     public function addAspirante(\App\Entity\Backend\Club $aspirante)
  2438.     {
  2439.         $this->aspirantes[] = $aspirante;
  2440.         return $this;
  2441.     }
  2442.     /**
  2443.      * Remove aspirantes
  2444.      *
  2445.      * @param \App\Entity\Backend\Club $aspirante
  2446.      */
  2447.     public function removeAspirante(\App\Entity\Backend\Club $aspirante)
  2448.     {
  2449.         $this->aspirantes->removeElement($aspirante);
  2450.     }
  2451.     /**
  2452.      * Get aspirantes
  2453.      *
  2454.      * @return \Doctrine\Common\Collections\Collection
  2455.      */
  2456.     public function getAspirantes()
  2457.     {
  2458.         return $this->aspirantes;
  2459.     }
  2460.     /**
  2461.      * Set aspirantes
  2462.      *
  2463.      * @param \Doctrine\Common\Collections\ArrayCollection $aspirantes
  2464.      * @return Competicion
  2465.      */
  2466.     public function setAspirantes($aspirantes)
  2467.     {
  2468.         $this->aspirantes $aspirantes;
  2469.         return $this->aspirantes;
  2470.     }
  2471.     /**
  2472.      * Add preferentes
  2473.      *
  2474.      * @param \App\Entity\Backend\Club $preferentes
  2475.      * @return Competicion
  2476.      */
  2477.     public function addPreferente(\App\Entity\Backend\Club $preferentes)
  2478.     {
  2479.         $this->preferentes[] = $preferentes;
  2480.         return $this;
  2481.     }
  2482.     /**
  2483.      * Remove preferentes
  2484.      *
  2485.      * @param \App\Entity\Backend\Club $preferentes
  2486.      */
  2487.     public function removePreferente(\App\Entity\Backend\Club $preferentes)
  2488.     {
  2489.         $this->preferentes->removeElement($preferentes);
  2490.     }
  2491.     /**
  2492.      * Get preferentes
  2493.      *
  2494.      * @return \Doctrine\Common\Collections\Collection
  2495.      */
  2496.     public function getPreferentes()
  2497.     {
  2498.         return $this->preferentes;
  2499.     }
  2500.     /**
  2501.      * Set preferentes
  2502.      *
  2503.      * @param \Doctrine\Common\Collections\ArrayCollection $preferentes
  2504.      * @return Competicion
  2505.      */
  2506.     public function setPreferentes($preferentes)
  2507.     {
  2508.         $this->preferentes $preferentes;
  2509.         return $this->preferentes;
  2510.     }
  2511.     /**
  2512.      * Set observacionesPlanificacion
  2513.      *
  2514.      * @param string $observacionesPlanificacion
  2515.      * @return Competicion
  2516.      */
  2517.     public function setObservacionesPlanificacion($observacionesPlanificacion)
  2518.     {
  2519.         $this->observaciones_planificacion $observacionesPlanificacion;
  2520.         return $this;
  2521.     }
  2522.     /**
  2523.      * Get observacionesPlanificacion
  2524.      *
  2525.      * @return string
  2526.      */
  2527.     public function getObservacionesPlanificacion()
  2528.     {
  2529.         return $this->observaciones_planificacion;
  2530.     }
  2531.     /**
  2532.      * Set tag_color
  2533.      *
  2534.      * @param string $tagColor
  2535.      * @return Competicion
  2536.      */
  2537.     public function setTagColor($tagColor)
  2538.     {
  2539.         $color strtolower(str_replace("#"""$tagColor));
  2540.         $this->tag_color = (strtolower($color) != "ffffff") ? $color null;
  2541.         return $this;
  2542.     }
  2543.     /**
  2544.      * Get tag_color
  2545.      *
  2546.      * @return string
  2547.      */
  2548.     public function getTagColor()
  2549.     {
  2550.         return ($this->tag_color) ? "#" $this->tag_color null;
  2551.     }
  2552.     /**
  2553.      * Set showLiveScoring
  2554.      *
  2555.      * @param enumestadolivescoring $showLiveScoring
  2556.      * @return Competicion
  2557.      */
  2558.     public function setShowLiveScoring($showLiveScoring)
  2559.     {
  2560.         //Si viene vacío metemos el valor por defecto
  2561.         $this->show_live_scoring = !empty($showLiveScoring) ? $showLiveScoring "club";
  2562.         return $this;
  2563.     }
  2564.     /**
  2565.      * Get showLiveScoring
  2566.      *
  2567.      * @return boolean
  2568.      */
  2569.     public function getShowLiveScoring()
  2570.     {
  2571.         return $this->show_live_scoring;
  2572.     }
  2573.     /**
  2574.      * Set rfc
  2575.      *
  2576.      * @param boolean $rfc
  2577.      * @return Competicion
  2578.      */
  2579.     public function setRfc($rfc)
  2580.     {
  2581.         $this->rfc $rfc;
  2582.     }
  2583.     /**
  2584.      * Get rfc
  2585.      *
  2586.      * @return boolean
  2587.      */
  2588.     public function getRfc()
  2589.     {
  2590.         return $this->rfc;
  2591.     }
  2592.     /**
  2593.      * Get hcpInscritoMasculino
  2594.      *
  2595.      * @return integer
  2596.      */
  2597.     public function getHcpInscritoMasculino()
  2598.     {
  2599.         return $this->hcp_inscrito_masculino;
  2600.     }
  2601.     /**
  2602.      * Get hcpInscritoMasculinoMin
  2603.      *
  2604.      * @return integer
  2605.      */
  2606.     public function getHcpInscritoMasculinoMin()
  2607.     {
  2608.         return $this->hcp_inscrito_masculino_min;
  2609.     }
  2610.     /**
  2611.      * Get hcpInscritoFemenino
  2612.      *
  2613.      * @return integer
  2614.      */
  2615.     public function getHcpInscritoFemenino()
  2616.     {
  2617.         return $this->hcp_inscrito_femenino;
  2618.     }
  2619.     /**
  2620.      * Get hcpInscritoFemeninoMin
  2621.      *
  2622.      * @return integer
  2623.      */
  2624.     public function getHcpInscritoFemeninoMin()
  2625.     {
  2626.         return $this->hcp_inscrito_femenino_min;
  2627.     }
  2628.     /**
  2629.      * Get hcpJuegoInscripcionMasculinoMin
  2630.      *
  2631.      * @return integer|null
  2632.      */
  2633.     public function getHcpJuegoInscripcionMasculinoMin()
  2634.     {
  2635.         return $this->hcp_juego_inscripcion_masculino_min;
  2636.     }
  2637.     /**
  2638.      * Get hcpJuegoInscripcionMasculinoMax
  2639.      *
  2640.      * @return integer|null
  2641.      */
  2642.     public function getHcpJuegoInscripcionMasculinoMax()
  2643.     {
  2644.         return $this->hcp_juego_inscripcion_masculino_max;
  2645.     }
  2646.     /**
  2647.      * Get hcpJuegoInscripcionFemeninoMin
  2648.      *
  2649.      * @return integer|null
  2650.      */
  2651.     public function getHcpJuegoInscripcionFemeninoMin()
  2652.     {
  2653.         return $this->hcp_juego_inscripcion_femenino_min;
  2654.     }
  2655.     /**
  2656.      * Get hcpJuegoInscripcionFemeninoMax
  2657.      *
  2658.      * @return integer|null
  2659.      */
  2660.     public function getHcpJuegoInscripcionFemeninoMax()
  2661.     {
  2662.         return $this->hcp_juego_inscripcion_femenino_max;
  2663.     }
  2664.     /**
  2665.      * Get hcpJuegoMasculino
  2666.      *
  2667.      * @return integer
  2668.      */
  2669.     public function getHcpJuegoMasculino()
  2670.     {
  2671.         return $this->hcp_juego_masculino;
  2672.     }
  2673.     /**
  2674.      * Get hcpJuegoFemenino
  2675.      *
  2676.      * @return integer
  2677.      */
  2678.     public function getHcpJuegoFemenino()
  2679.     {
  2680.         return $this->hcp_juego_femenino;
  2681.     }
  2682.     /**
  2683.      * Get hcpJuegoPareja
  2684.      *
  2685.      * @return integer
  2686.      */
  2687.     public function getHcpJuegoPareja()
  2688.     {
  2689.         return $this->hcp_juego_pareja;
  2690.     }
  2691.     /**
  2692.      * Get hcpJuegoEquipo
  2693.      *
  2694.      * @return integer
  2695.      */
  2696.     public function getHcpJuegoEquipo()
  2697.     {
  2698.         return $this->hcp_juego_equipo;
  2699.     }
  2700.     /**
  2701.      * Set hcpInscritoMasculino
  2702.      *
  2703.      * @param integer $hcpInscritoMasculino
  2704.      * @return Competicion
  2705.      */
  2706.     public function setHcpInscritoMasculino($hcpInscritoMasculino)
  2707.     {
  2708.         $this->hcp_inscrito_masculino $hcpInscritoMasculino;
  2709.     }
  2710.     /**
  2711.      * Set hcpInscritoFemenino
  2712.      *
  2713.      * @param integer $hcpInscritoFemenino
  2714.      * @return Competicion
  2715.      */
  2716.     public function setHcpInscritoFemenino($hcpInscritoFemenino)
  2717.     {
  2718.         $this->hcp_inscrito_femenino $hcpInscritoFemenino;
  2719.     }
  2720.     /**
  2721.      * Set hcpInscritoMasculinoMin
  2722.      *
  2723.      * @param integer $hcpInscritoMasculinoMin
  2724.      * @return Competicion
  2725.      */
  2726.     public function setHcpInscritoMasculinoMin($hcpInscritoMasculinoMin)
  2727.     {
  2728.         $this->hcp_inscrito_masculino_min $hcpInscritoMasculinoMin;
  2729.     }
  2730.     /**
  2731.      * Set hcpInscritoFemeninoMin
  2732.      *
  2733.      * @param integer $hcpInscritoFemeninoMin
  2734.      * @return Competicion
  2735.      */
  2736.     public function setHcpInscritoFemeninoMin($hcpInscritoFemeninoMin)
  2737.     {
  2738.         $this->hcp_inscrito_femenino_min $hcpInscritoFemeninoMin;
  2739.     }
  2740.     /**
  2741.      * Set hcpJuegoInscripcionMasculinoMin
  2742.      *
  2743.      * @param integer|null $hcpJuegoInscripcionMasculinoMin
  2744.      * @return Competicion
  2745.      */
  2746.     public function setHcpJuegoInscripcionMasculinoMin($hcpJuegoInscripcionMasculinoMin)
  2747.     {
  2748.         $this->hcp_juego_inscripcion_masculino_min $this->normalizeNullableInteger($hcpJuegoInscripcionMasculinoMin);
  2749.     }
  2750.     /**
  2751.      * Set hcpJuegoInscripcionMasculinoMax
  2752.      *
  2753.      * @param integer|null $hcpJuegoInscripcionMasculinoMax
  2754.      * @return Competicion
  2755.      */
  2756.     public function setHcpJuegoInscripcionMasculinoMax($hcpJuegoInscripcionMasculinoMax)
  2757.     {
  2758.         $this->hcp_juego_inscripcion_masculino_max $this->normalizeNullableInteger($hcpJuegoInscripcionMasculinoMax);
  2759.     }
  2760.     /**
  2761.      * Set hcpJuegoInscripcionFemeninoMin
  2762.      *
  2763.      * @param integer|null $hcpJuegoInscripcionFemeninoMin
  2764.      * @return Competicion
  2765.      */
  2766.     public function setHcpJuegoInscripcionFemeninoMin($hcpJuegoInscripcionFemeninoMin)
  2767.     {
  2768.         $this->hcp_juego_inscripcion_femenino_min $this->normalizeNullableInteger($hcpJuegoInscripcionFemeninoMin);
  2769.     }
  2770.     /**
  2771.      * Set hcpJuegoInscripcionFemeninoMax
  2772.      *
  2773.      * @param integer|null $hcpJuegoInscripcionFemeninoMax
  2774.      * @return Competicion
  2775.      */
  2776.     public function setHcpJuegoInscripcionFemeninoMax($hcpJuegoInscripcionFemeninoMax)
  2777.     {
  2778.         $this->hcp_juego_inscripcion_femenino_max $this->normalizeNullableInteger($hcpJuegoInscripcionFemeninoMax);
  2779.     }
  2780.     /**
  2781.      * Set hcpJuegoMasculino
  2782.      *
  2783.      * @param boolean $hcpJuegoMasculino
  2784.      * @return Competicion
  2785.      */
  2786.     public function setHcpJuegoMasculino($hcpJuegoMasculino)
  2787.     {
  2788.         $this->hcp_juego_masculino $hcpJuegoMasculino;
  2789.     }
  2790.     /**
  2791.      * Set hcpJuegoFemenino
  2792.      *
  2793.      * @param boolean $hcpJuegoFemenino
  2794.      * @return Competicion
  2795.      */
  2796.     public function setHcpJuegoFemenino($hcpJuegoFemenino)
  2797.     {
  2798.         $this->hcp_juego_femenino $hcpJuegoFemenino;
  2799.     }
  2800.     /**
  2801.      * Set hcpJuegoPareja
  2802.      *
  2803.      * @param boolean $hcpJuegoPareja
  2804.      * @return Competicion
  2805.      */
  2806.     public function setHcpJuegoPareja($hcpJuegoPareja)
  2807.     {
  2808.         $this->hcp_juego_pareja $hcpJuegoPareja;
  2809.     }
  2810.     /**
  2811.      * Set hcpJuegoEquipo
  2812.      *
  2813.      * @param boolean $hcpJuegoEquipo
  2814.      * @return Competicion
  2815.      */
  2816.     public function setHcpJuegoEquipo($hcpJuegoEquipo)
  2817.     {
  2818.         $this->hcp_juego_equipo $hcpJuegoEquipo;
  2819.     }
  2820.     /**
  2821.      * Converts empty input to null for nullable integer fields.
  2822.      *
  2823.      * @param mixed $value
  2824.      * @return integer|null
  2825.      */
  2826.     private function normalizeNullableInteger($value)
  2827.     {
  2828.         if ($value === null) {
  2829.             return null;
  2830.         }
  2831.         if (is_string($value)) {
  2832.             $value trim($value);
  2833.             if ($value === '') {
  2834.                 return null;
  2835.             }
  2836.         }
  2837.         return is_numeric($value) ? (int) $value null;
  2838.     }
  2839.     /**
  2840.      * Set ficheroVariosNombre
  2841.      *
  2842.      * @param string $ficheroVariosNombre
  2843.      * @return Competicion
  2844.      */
  2845.     public function setFicheroVariosNombre($ficheroVariosNombre)
  2846.     {
  2847.         $this->fichero_varios_nombre $ficheroVariosNombre;
  2848.         return $this;
  2849.     }
  2850.     /**
  2851.      * Get ficheroVariosNombre
  2852.      *
  2853.      * @return string
  2854.      */
  2855.     public function getFicheroVariosNombre()
  2856.     {
  2857.         return $this->fichero_varios_nombre;
  2858.     }
  2859.     /**
  2860.      * Set premios
  2861.      *
  2862.      * @param string $premios
  2863.      * @return Competicion
  2864.      */
  2865.     public function setPremios($premios)
  2866.     {
  2867.         $this->premios $premios;
  2868.         return $this;
  2869.     }
  2870.     /**
  2871.      * Get premios
  2872.      *
  2873.      * @return string
  2874.      */
  2875.     public function getPremios()
  2876.     {
  2877.         return $this->premios;
  2878.     }
  2879.     /**
  2880.      * Set reglas
  2881.      *
  2882.      * @param string $reglas
  2883.      * @return Competicion
  2884.      */
  2885.     public function setReglas($reglas)
  2886.     {
  2887.         $this->reglas $reglas;
  2888.         return $this;
  2889.     }
  2890.     /**
  2891.      * Get reglas
  2892.      *
  2893.      * @return string
  2894.      */
  2895.     public function getReglas()
  2896.     {
  2897.         return $this->reglas;
  2898.     }
  2899.     /**
  2900.      * Set arbitrable
  2901.      *
  2902.      * @param boolean $arbitrable
  2903.      * @return Competicion
  2904.      */
  2905.     public function setArbitrable($arbitrable)
  2906.     {
  2907.         $this->arbitrable $arbitrable;
  2908.         return $this;
  2909.     }
  2910.     /**
  2911.      * Get arbitrable
  2912.      *
  2913.      * @return boolean
  2914.      */
  2915.     public function getArbitrable()
  2916.     {
  2917.         return $this->arbitrable;
  2918.     }
  2919.     /**
  2920.      * Set direccionTorneos
  2921.      *
  2922.      * @param boolean $direccionTorneos
  2923.      * @return Competicion
  2924.      */
  2925.     public function setDireccionTorneos($direccionTorneos)
  2926.     {
  2927.         $this->direccion_torneos $direccionTorneos;
  2928.         return $this;
  2929.     }
  2930.     /**
  2931.      * Get direccionTorneos
  2932.      *
  2933.      * @return boolean
  2934.      */
  2935.     public function getDireccionTorneos()
  2936.     {
  2937.         return $this->direccion_torneos;
  2938.     }
  2939.     /**
  2940.      * Set asistenciaPresidente
  2941.      *
  2942.      * @param boolean $asistenciaPresidente
  2943.      * @return Competicion
  2944.      */
  2945.     public function setAsistenciaPresidente($asistenciaPresidente)
  2946.     {
  2947.         $this->asistencia_presidente $asistenciaPresidente;
  2948.         return $this;
  2949.     }
  2950.     /**
  2951.      * Get asistenciaPresidente
  2952.      *
  2953.      * @return boolean
  2954.      */
  2955.     public function getAsistenciaPresidente()
  2956.     {
  2957.         return $this->asistencia_presidente;
  2958.     }
  2959.     /**
  2960.      * Set institucional
  2961.      *
  2962.      * @param boolean $institucional
  2963.      * @return Competicion
  2964.      */
  2965.     public function setInstitucional($institucional)
  2966.     {
  2967.         $this->institucional $institucional;
  2968.         return $this;
  2969.     }
  2970.     /**
  2971.      * Get institucional
  2972.      *
  2973.      * @return boolean
  2974.      */
  2975.     public function getInstitucional()
  2976.     {
  2977.         return $this->institucional;
  2978.     }
  2979.     /**
  2980.      * Set voluntarios
  2981.      *
  2982.      * @param boolean $voluntarios
  2983.      * @return Competicion
  2984.      */
  2985.     public function setVoluntarios($voluntarios)
  2986.     {
  2987.         $this->voluntarios $voluntarios;
  2988.         return $this;
  2989.     }
  2990.     /**
  2991.      * Get voluntarios
  2992.      *
  2993.      * @return boolean
  2994.      */
  2995.     public function getVoluntarios()
  2996.     {
  2997.         return $this->voluntarios;
  2998.     }
  2999.     /**
  3000.      * Set flyer
  3001.      *
  3002.      * @param boolean $flyer
  3003.      * @return Competicion
  3004.      */
  3005.     public function setFlyer($flyer)
  3006.     {
  3007.         $this->flyer $flyer;
  3008.         return $this;
  3009.     }
  3010.     /**
  3011.      * Get flyer
  3012.      *
  3013.      * @return boolean
  3014.      */
  3015.     public function getFlyer()
  3016.     {
  3017.         return $this->flyer;
  3018.     }
  3019.     /**
  3020.      * Set permitir
  3021.      *
  3022.      * @param boolean $permitir
  3023.      * @return Competicion
  3024.      */
  3025.     public function setPermitir($permitir)
  3026.     {
  3027.         $this->permitir $permitir;
  3028.         return $this;
  3029.     }
  3030.     /**
  3031.      * Get permitir
  3032.      *
  3033.      * @return boolean
  3034.      */
  3035.     public function getPermitir()
  3036.     {
  3037.         return $this->permitir;
  3038.     }
  3039.     /**
  3040.      * Set social
  3041.      *
  3042.      * @param boolean $social
  3043.      * @return Competicion
  3044.      */
  3045.     public function setSocial($social)
  3046.     {
  3047.         $this->social $social;
  3048.         return $this;
  3049.     }
  3050.     /**
  3051.      * Get social
  3052.      *
  3053.      * @return boolean
  3054.      */
  3055.     public function getSocial()
  3056.     {
  3057.         return $this->social;
  3058.     }
  3059.     /**
  3060.      * Set visible
  3061.      *
  3062.      * @param boolean $visible
  3063.      * @return Competicion
  3064.      */
  3065.     public function setVisible($visible)
  3066.     {
  3067.         $this->visible $visible;
  3068.         return $this;
  3069.     }
  3070.     /**
  3071.      * Get visible
  3072.      *
  3073.      * @return boolean
  3074.      */
  3075.     public function getVisible()
  3076.     {
  3077.         return $this->visible;
  3078.     }
  3079.     /**
  3080.      * Set hcpEstricto
  3081.      *
  3082.      * @param boolean $hcpEstricto
  3083.      * @return Competicion
  3084.      */
  3085.     public function setHcpEstricto($hcpEstricto)
  3086.     {
  3087.         $this->hcp_estricto $hcpEstricto;
  3088.         return $this;
  3089.     }
  3090.     /**
  3091.      * Get hcpEstricto
  3092.      *
  3093.      * @return boolean
  3094.      */
  3095.     public function getHcpEstricto()
  3096.     {
  3097.         return $this->hcp_estricto;
  3098.     }
  3099.     /**
  3100.      * Set popup_inscripcion
  3101.      *
  3102.      * @param boolean $popup_inscripcion
  3103.      * @return Competicion
  3104.      */
  3105.     public function setPopupInscripcion($popup_inscripcion)
  3106.     {
  3107.         $this->popup_inscripcion $popup_inscripcion;
  3108.         return $this;
  3109.     }
  3110.     /**
  3111.      * Get popup_inscripcion
  3112.      *
  3113.      * @return boolean
  3114.      */
  3115.     public function getPopupInscripcion()
  3116.     {
  3117.         return $this->popup_inscripcion;
  3118.     }
  3119.     /**
  3120.      * Set popup_inscripcion_texto
  3121.      *
  3122.      * @param string $popup_inscripcion_texto
  3123.      * @return Competicion
  3124.      */
  3125.     public function setPopupInscripcionTexto($popup_inscripcion_texto)
  3126.     {
  3127.         $this->popup_inscripcion_texto $popup_inscripcion_texto;
  3128.         return $this;
  3129.     }
  3130.     /**
  3131.      * Get popup_inscripcion_texto
  3132.      *
  3133.      * @return string
  3134.      */
  3135.     public function getPopupInscripcionTexto()
  3136.     {
  3137.         return $this->popup_inscripcion_texto;
  3138.     }
  3139.     /**
  3140.      * Set seguimiento
  3141.      *
  3142.      * @param boolean $seguimiento
  3143.      * @return Competicion
  3144.      */
  3145.     public function setSeguimiento($seguimiento)
  3146.     {
  3147.         $this->seguimiento $seguimiento;
  3148.         return $this;
  3149.     }
  3150.     /**
  3151.      * Get seguimiento
  3152.      *
  3153.      * @return boolean
  3154.      */
  3155.     public function getSeguimiento()
  3156.     {
  3157.         return $this->seguimiento;
  3158.     }
  3159.     /**
  3160.      * Set mostrar_sorteo
  3161.      *
  3162.      * @param boolean $mostrarSorteo
  3163.      * @return Competicion
  3164.      */
  3165.     public function setMostrarSorteo($mostrarSorteo)
  3166.     {
  3167.         $this->mostrar_sorteo $mostrarSorteo;
  3168.         return $this;
  3169.     }
  3170.     /**
  3171.      * Get mostrar_sorteo
  3172.      *
  3173.      * @return boolean
  3174.      */
  3175.     public function getMostrarSorteo()
  3176.     {
  3177.         return $this->mostrar_sorteo;
  3178.     }
  3179.     /**
  3180.      * Add albaranes
  3181.      *
  3182.      * @param \App\Entity\Backend\Albaran $albaranes
  3183.      * @return Competicion
  3184.      */
  3185.     public function addAlbarane(\App\Entity\Backend\Albaran $albaranes)
  3186.     {
  3187.         $this->albaranes[] = $albaranes;
  3188.         return $this;
  3189.     }
  3190.     /**
  3191.      * Remove albaranes
  3192.      *
  3193.      * @param \App\Entity\Backend\Albaran $albaranes
  3194.      */
  3195.     public function removeAlbarane(\App\Entity\Backend\Albaran $albaranes)
  3196.     {
  3197.         $this->albaranes->removeElement($albaranes);
  3198.     }
  3199.     /**
  3200.      * Get albaranes
  3201.      *
  3202.      * @return \Doctrine\Common\Collections\Collection
  3203.      */
  3204.     public function getAlbaranes()
  3205.     {
  3206.         return $this->albaranes;
  3207.     }
  3208.     /**
  3209.      * Add adicionales
  3210.      *
  3211.      * @param \App\Entity\Backend\DatoAdicional $adicionales
  3212.      * @return Competicion
  3213.      */
  3214.     public function addAdicional(\App\Entity\Backend\DatoAdicional $adicionales)
  3215.     {
  3216.         $adicionales->setCompeticion($this);
  3217.         $this->adicionales[] = $adicionales;
  3218.         return $this;
  3219.     }
  3220.     /**
  3221.      * Remove adicionales
  3222.      *
  3223.      * @param \App\Entity\Backend\DatoAdicional $adicionales
  3224.      */
  3225.     public function removeAdicional(\App\Entity\Backend\DatoAdicional $adicionales)
  3226.     {
  3227.         $this->adicionales->removeElement($adicionales);
  3228.         $adicionales->removeCompeticion();
  3229.     }
  3230.     /**
  3231.      * Get adicionales
  3232.      *
  3233.      * @return \Doctrine\Common\Collections\Collection
  3234.      */
  3235.     public function getAdicionales()
  3236.     {
  3237.         return $this->adicionales;
  3238.     }
  3239.     public function getAdicionalesFiltered()
  3240.     {
  3241.         return array_filter($this->adicionales->toArray(), function ($a) {
  3242.             return $a->getTipo() != "Privacidad";
  3243.         });
  3244.     }
  3245.     public function getRegistrationForm(): ?CompetitionRegistrationForm
  3246.     {
  3247.         return $this->registrationForm;
  3248.     }
  3249.     public function setRegistrationForm(?CompetitionRegistrationForm $registrationForm): self
  3250.     {
  3251.         $this->registrationForm $registrationForm;
  3252.         return $this;
  3253.     }
  3254.     /**
  3255.      * Set lista_espera
  3256.      *
  3257.      * @param boolean $lista_espera
  3258.      * @return Competicion
  3259.      */
  3260.     public function setListaEspera($lista_espera)
  3261.     {
  3262.         $this->lista_espera $lista_espera;
  3263.         return $this;
  3264.     }
  3265.     /**
  3266.      * Get lista_espera
  3267.      *
  3268.      * @return boolean
  3269.      */
  3270.     public function getListaEspera()
  3271.     {
  3272.         return $this->lista_espera;
  3273.     }
  3274.     public function getRestringirLicencia()
  3275.     {
  3276.         return $this->restringir_licencia;
  3277.     }
  3278.     public function setRestringirLicencia($restringir_licencia): self
  3279.     {
  3280.         $this->restringir_licencia $restringir_licencia;
  3281.         return $this;
  3282.     }
  3283.     /**
  3284.      * Set seleccion_tarifas
  3285.      *
  3286.      * @param boolean $seleccionTarifas
  3287.      * @return Competicion
  3288.      */
  3289.     public function setSeleccionTarifas($seleccionTarifas)
  3290.     {
  3291.         $this->seleccion_tarifas $seleccionTarifas;
  3292.         return $this;
  3293.     }
  3294.     /**
  3295.      * Get seleccion_tarifas
  3296.      *
  3297.      * @return boolean
  3298.      */
  3299.     public function getSeleccionTarifas()
  3300.     {
  3301.         return $this->seleccion_tarifas;
  3302.     }
  3303.     /**
  3304.      * Add adicionales
  3305.      *
  3306.      * @param \App\Entity\Backend\DatoAdicional $adicionales
  3307.      * @return Competicion
  3308.      */
  3309.     public function addAdicionale(\App\Entity\Backend\DatoAdicional $adicionales)
  3310.     {
  3311.         $this->adicionales[] = $adicionales;
  3312.         return $this;
  3313.     }
  3314.     /**
  3315.      * Remove adicionales
  3316.      *
  3317.      * @param \App\Entity\Backend\DatoAdicional $adicionales
  3318.      */
  3319.     public function removeAdicionale(\App\Entity\Backend\DatoAdicional $adicionales)
  3320.     {
  3321.         $this->adicionales->removeElement($adicionales);
  3322.     }
  3323.     /**
  3324.      * Set permitir_extranjeros
  3325.      *
  3326.      * @param boolean $permitirExtranjeros
  3327.      * @return Competicion
  3328.      */
  3329.     public function setPermitirExtranjeros($permitirExtranjeros)
  3330.     {
  3331.         $this->permitir_extranjeros $permitirExtranjeros;
  3332.         return $this;
  3333.     }
  3334.     /**
  3335.      * Get permitir_extranjeros
  3336.      *
  3337.      * @return boolean
  3338.      */
  3339.     public function getPermitirExtranjeros()
  3340.     {
  3341.         return $this->permitir_extranjeros;
  3342.     }
  3343.     /**
  3344.      * Set plazas_manana
  3345.      *
  3346.      * @param integer $plazasManana
  3347.      * @return Competicion
  3348.      */
  3349.     public function setPlazasManana($plazasManana)
  3350.     {
  3351.         $this->plazas_manana $plazasManana;
  3352.         return $this;
  3353.     }
  3354.     /**
  3355.      * Get plazas_manana
  3356.      *
  3357.      * @return integer
  3358.      */
  3359.     public function getPlazasManana()
  3360.     {
  3361.         return $this->plazas_manana;
  3362.     }
  3363.     /**
  3364.      * Set plazas_tarde
  3365.      *
  3366.      * @param integer $plazasTarde
  3367.      * @return Competicion
  3368.      */
  3369.     public function setPlazasTarde($plazasTarde)
  3370.     {
  3371.         $this->plazas_tarde $plazasTarde;
  3372.         return $this;
  3373.     }
  3374.     /**
  3375.      * Get plazas_tarde
  3376.      *
  3377.      * @return integer
  3378.      */
  3379.     public function getPlazasTarde()
  3380.     {
  3381.         return $this->plazas_tarde;
  3382.     }
  3383.     /**
  3384.      * Set tarjeta_electronica
  3385.      *
  3386.      * @param boolean $tarjeta_electronica
  3387.      * @return Competicion
  3388.      */
  3389.     public function setTarjetaElectronica($tarjeta_electronica)
  3390.     {
  3391.         $this->tarjeta_electronica $tarjeta_electronica;
  3392.         return $this;
  3393.     }
  3394.     /**
  3395.      * Get tarjeta_electronica
  3396.      *
  3397.      * @return boolean
  3398.      */
  3399.     public function getTarjetaElectronica()
  3400.     {
  3401.         return $this->tarjeta_electronica;
  3402.     }
  3403.     public function setAutoAssignMarker($auto_assign_marker)
  3404.     {
  3405.         $this->auto_assign_marker $auto_assign_marker;
  3406.         return $this;
  3407.     }
  3408.     public function getAutoAssignMarker()
  3409.     {
  3410.         return $this->auto_assign_marker;
  3411.     }
  3412.     /**
  3413.      * Set codigo_contable
  3414.      *
  3415.      * @param string $codigoContable
  3416.      * @return Competicion
  3417.      */
  3418.     public function setCodigoContable($codigoContable)
  3419.     {
  3420.         $this->codigo_contable $codigoContable;
  3421.         return $this;
  3422.     }
  3423.     /**
  3424.      * Get codigo_contable
  3425.      *
  3426.      * @return string
  3427.      */
  3428.     public function getCodigoContable()
  3429.     {
  3430.         return $this->codigo_contable;
  3431.     }
  3432.     /**
  3433.      * Set livescoring_comunidad
  3434.      *
  3435.      * @param boolean $livescoringComunidad
  3436.      * @return Competicion
  3437.      */
  3438.     public function setLivescoringComunidad($livescoringComunidad)
  3439.     {
  3440.         $this->livescoring_comunidad $livescoringComunidad;
  3441.         return $this;
  3442.     }
  3443.     /**
  3444.      * Get livescoring_comunidad
  3445.      *
  3446.      * @return boolean
  3447.      */
  3448.     public function getLivescoringComunidad()
  3449.     {
  3450.         return $this->livescoring_comunidad;
  3451.     }
  3452.     /**
  3453.      * Get plazas_lista_espera
  3454.      *
  3455.      * @return integer
  3456.      */
  3457.     public function getPlazasListaEspera()
  3458.     {
  3459.         return $this->plazas_lista_espera;
  3460.     }
  3461.     /**
  3462.      * Set plazas_tarde
  3463.      *
  3464.      * @param integer $plazasListaEspera
  3465.      * @return Competicion
  3466.      */
  3467.     public function setPlazasListaEspera($plazasListaEspera)
  3468.     {
  3469.         $this->plazas_lista_espera $plazasListaEspera;
  3470.         return $this;
  3471.     }
  3472.     /**
  3473.      * Get comites
  3474.      *
  3475.      * @return \Doctrine\Common\Collections\Collection
  3476.      */
  3477.     public function getNombresComites()
  3478.     {
  3479.         $nombres = [];
  3480.         foreach ($this->comites as $comite) {
  3481.             $nombres[] = $comite->getNombre();
  3482.         }
  3483.         return $nombres;
  3484.     }
  3485.     public function getDeletedAt()
  3486.     {
  3487.         return $this->deleted_at;
  3488.     }
  3489.     public function setDeletedAt($deleted_at)
  3490.     {
  3491.         $this->deleted_at $deleted_at;
  3492.     }
  3493.     /**
  3494.      * Set contacto
  3495.      *
  3496.      * @param string $contacto
  3497.      * @return Competicion
  3498.      */
  3499.     public function setContacto($contacto)
  3500.     {
  3501.         $this->contacto $contacto;
  3502.         return $this;
  3503.     }
  3504.     /**
  3505.      * Get contacto
  3506.      *
  3507.      * @return string
  3508.      */
  3509.     public function getContacto()
  3510.     {
  3511.         return $this->contacto;
  3512.     }
  3513.     /**
  3514.      * Add rankings
  3515.      *
  3516.      * @param \App\Entity\Gestion\CompeticionRanking $rankings
  3517.      * @return Competicion
  3518.      */
  3519.     public function addRanking(\App\Entity\Gestion\CompeticionRanking $rankings)
  3520.     {
  3521.         $this->rankings[] = $rankings;
  3522.         return $this;
  3523.     }
  3524.     /**
  3525.      * Remove rankings
  3526.      *
  3527.      * @param \App\Entity\Gestion\CompeticionRanking $rankings
  3528.      */
  3529.     public function removeRanking(\App\Entity\Gestion\CompeticionRanking $rankings)
  3530.     {
  3531.         $this->rankings->removeElement($rankings);
  3532.     }
  3533.     /**
  3534.      * Get rankings
  3535.      *
  3536.      * @return \Doctrine\Common\Collections\Collection
  3537.      */
  3538.     public function getRankings()
  3539.     {
  3540.         return $this->rankings;
  3541.     }
  3542.     /**
  3543.      * Set benefico
  3544.      *
  3545.      * @param boolean $benefico
  3546.      * @return Competicion
  3547.      */
  3548.     public function setBenefico($benefico)
  3549.     {
  3550.         $this->benefico $benefico;
  3551.         return $this;
  3552.     }
  3553.     /**
  3554.      * Get benefico
  3555.      *
  3556.      * @return boolean
  3557.      */
  3558.     public function getBenefico()
  3559.     {
  3560.         return $this->benefico;
  3561.     }
  3562.     /**
  3563.      * Add vouchers
  3564.      *
  3565.      * @param Voucher $vouchers
  3566.      * @return Competicion
  3567.      */
  3568.     public function addVoucher(Voucher $vouchers)
  3569.     {
  3570.         $this->vouchers[] = $vouchers;
  3571.         return $this;
  3572.     }
  3573.     /**
  3574.      * Remove vouchers
  3575.      *
  3576.      * @param Voucher $vouchers
  3577.      */
  3578.     public function removeVoucher(Voucher $vouchers)
  3579.     {
  3580.         $this->vouchers->removeElement($vouchers);
  3581.     }
  3582.     /**
  3583.      * Get vouchers
  3584.      *
  3585.      * @return \Doctrine\Common\Collections\Collection
  3586.      */
  3587.     public function getVouchers()
  3588.     {
  3589.         return $this->vouchers;
  3590.     }
  3591.     /**
  3592.      * Set flickr_gallery
  3593.      *
  3594.      * @param string $flickr_gallery
  3595.      */
  3596.     public function setFlickrGallery($flickr_gallery)
  3597.     {
  3598.         $this->flickr_gallery $flickr_gallery;
  3599.     }
  3600.     /**
  3601.      * Get flickr_gallery
  3602.      *
  3603.      * @return string
  3604.      */
  3605.     public function getFlickrGallery()
  3606.     {
  3607.         return $this->flickr_gallery;
  3608.     }
  3609.     /**
  3610.      * Set barra_salida
  3611.      *
  3612.      * @param boolean $barraSalida
  3613.      * @return Competicion
  3614.      */
  3615.     public function setBarraSalida($barraSalida)
  3616.     {
  3617.         $this->barra_salida $barraSalida;
  3618.         return $this;
  3619.     }
  3620.     /**
  3621.      * Get barra_salida
  3622.      *
  3623.      * @return boolean
  3624.      */
  3625.     public function getBarraSalida()
  3626.     {
  3627.         return $this->barra_salida;
  3628.     }
  3629.     /**
  3630.      * Set observacionesFrontend
  3631.      *
  3632.      * @param string $observacionesFrontend
  3633.      * @return Competicion
  3634.      */
  3635.     public function setObservacionesFrontend($observacionesFrontend)
  3636.     {
  3637.         $this->observaciones_frontend $observacionesFrontend;
  3638.         return $this;
  3639.     }
  3640.     /**
  3641.      * Get observacionesFrontend
  3642.      *
  3643.      * @return string
  3644.      */
  3645.     public function getObservacionesFrontend()
  3646.     {
  3647.         return $this->observaciones_frontend;
  3648.     }
  3649.     public function unlinkIfExist($file)
  3650.     {
  3651.         if (file_exists($file)) {
  3652.             unlink($file);
  3653.         }
  3654.     }
  3655.     public function getMostrarPlazas()
  3656.     {
  3657.         return $this->mostrar_plazas;
  3658.     }
  3659.     public function setMostrarPlazas($mostrar_plazas)
  3660.     {
  3661.         $this->mostrar_plazas $mostrar_plazas;
  3662.     }
  3663.     /**
  3664.      * Set politica_entrega
  3665.      *
  3666.      * @param integer $politicaEntrega
  3667.      * @return Competicion
  3668.      */
  3669.     public function setPoliticaEntrega($politicaEntrega)
  3670.     {
  3671.         $this->politica_entrega $politicaEntrega;
  3672.         return $this;
  3673.     }
  3674.     /**
  3675.      * Get politica_entrega
  3676.      *
  3677.      * @return integer
  3678.      */
  3679.     public function getPoliticaEntrega()
  3680.     {
  3681.         return $this->politica_entrega;
  3682.     }
  3683.     /**
  3684.      * Set politica_inicio
  3685.      *
  3686.      * @param integer $politicaInicio
  3687.      * @return Competicion
  3688.      */
  3689.     public function setPoliticaInicio($politicaInicio)
  3690.     {
  3691.         $this->politica_inicio $politicaInicio;
  3692.         return $this;
  3693.     }
  3694.     /**
  3695.      * Get politica_inicio
  3696.      *
  3697.      * @return integer
  3698.      */
  3699.     public function getPoliticaInicio()
  3700.     {
  3701.         return $this->politica_inicio;
  3702.     }
  3703.     public function getShortUrl(): ?string
  3704.     {
  3705.         return $this->short_url;
  3706.     }
  3707.     public function setShortUrl(?string $short_url): self
  3708.     {
  3709.         $this->short_url $short_url;
  3710.         return $this;
  3711.     }
  3712.     public function getPrivada(): ?bool
  3713.     {
  3714.         return $this->privada;
  3715.     }
  3716.     public function setPrivada(bool $privada): self
  3717.     {
  3718.         $this->privada $privada;
  3719.         return $this;
  3720.     }
  3721.     public function getMarcadorRfc(): ?MarcadorRfc
  3722.     {
  3723.         return $this->marcadorRfc;
  3724.     }
  3725.     public function setMarcadorRfc(MarcadorRfc $marcadorRfc): self
  3726.     {
  3727.         // set the owning side of the relation if necessary
  3728.         if ($marcadorRfc->getCompeticion() !== $this) {
  3729.             $marcadorRfc->setCompeticion($this);
  3730.         }
  3731.         $this->marcadorRfc $marcadorRfc;
  3732.         return $this;
  3733.     }
  3734.     /**
  3735.      * @return Collection<int, MensajeTorneo>
  3736.      */
  3737.     public function getMensajeTorneos(): Collection
  3738.     {
  3739.         return $this->mensajeTorneos;
  3740.     }
  3741.     public function addMensajeTorneo(MensajeTorneo $mensajeTorneo): self
  3742.     {
  3743.         if (!$this->mensajeTorneos->contains($mensajeTorneo)) {
  3744.             $this->mensajeTorneos[] = $mensajeTorneo;
  3745.             $mensajeTorneo->setCompeticion($this);
  3746.         }
  3747.         return $this;
  3748.     }
  3749.     public function removeMensajeTorneo(MensajeTorneo $mensajeTorneo): self
  3750.     {
  3751.         if ($this->mensajeTorneos->removeElement($mensajeTorneo)) {
  3752.             // set the owning side to null (unless already changed)
  3753.             if ($mensajeTorneo->getCompeticion() === $this) {
  3754.                 $mensajeTorneo->setCompeticion(null);
  3755.             }
  3756.         }
  3757.         return $this;
  3758.     }
  3759.     public function getRondas(): Collection
  3760.     {
  3761.         return $this->rondas;
  3762.     }
  3763.     public function getCameraUrl(): ?string
  3764.     {
  3765.         return $this->camera_url;
  3766.     }
  3767.     public function setCameraUrl(?string $camera_url): self
  3768.     {
  3769.         $this->camera_url $camera_url;
  3770.         return $this;
  3771.     }
  3772.     public function getCode(): string
  3773.     {
  3774.         return $this->getOrganizador()->getId() . "_" $this->getId();
  3775.     }
  3776.     public function getTipoConfiguracionMatchplay()
  3777.     {
  3778.         return $this->tipo_configuracion_matchplay;
  3779.     }
  3780.     public function setTipoConfiguracionMatchplay($tipo_configuracion_matchplay): self
  3781.     {
  3782.         $this->tipo_configuracion_matchplay $tipo_configuracion_matchplay;
  3783.         return $this;
  3784.     }
  3785.     public function getLiquidationDate(): ?\DateTime
  3786.     {
  3787.         return $this->liquidation_date;
  3788.     }
  3789.     public function setLiquidationDate($liquidation_date): self
  3790.     {
  3791.         $this->liquidation_date $liquidation_date;
  3792.         return $this;
  3793.     }
  3794.     public function getCollectionDate(): ?\DateTime
  3795.     {
  3796.         return $this->collection_date;
  3797.     }
  3798.     public function setCollectionDate($collection_date): self
  3799.     {
  3800.         $this->collection_date $collection_date;
  3801.         return $this;
  3802.     }
  3803.     /**
  3804.      * @return Collection<int, CompetitionSectionHidden>
  3805.      */
  3806.     public function getCompetitionSectionHidden(): Collection
  3807.     {
  3808.         return $this->competitionSectionHidden;
  3809.     }
  3810.     public function addCompetitionSectionHidden(CompetitionSectionHidden $competitionSectionHidden): self
  3811.     {
  3812.         if (!$this->competitionSectionHidden->contains($competitionSectionHidden)) {
  3813.             $this->competitionSectionHidden[] = $competitionSectionHidden;
  3814.             $competitionSectionHidden->setCompetition($this);
  3815.         }
  3816.         return $this;
  3817.     }
  3818.     public function removeCompetitionSectionHidden(CompetitionSectionHidden $competitionSectionHidden): self
  3819.     {
  3820.         if ($this->competitionSectionHidden->removeElement($competitionSectionHidden)) {
  3821.             // set the owning side to null (unless already changed)
  3822.             if ($competitionSectionHidden->getCompetition() === $this) {
  3823.                 $competitionSectionHidden->setCompetition(null);
  3824.             }
  3825.         }
  3826.         return $this;
  3827.     }
  3828.     public function getLivescoringPolicy(): string
  3829.     {
  3830.         return $this->livescoring_policy;
  3831.     }
  3832.     public function setLivescoringPolicy($livescoringPolicy): self
  3833.     {
  3834.         $this->livescoring_policy $livescoringPolicy;
  3835.         return $this;
  3836.     }
  3837.     public function isRyderCup(): bool
  3838.     {
  3839.         return $this->getFormula() && RYDER_CUP === $this->getFormula()->getId();
  3840.     }
  3841.     public function getLivescoringFormula(): string
  3842.     {
  3843.         return $this->livescoring_formula;
  3844.     }
  3845.     public function setLivescoringFormula(string $livescoring_formula): void
  3846.     {
  3847.         $this->livescoring_formula $livescoring_formula;
  3848.     }
  3849.     public function isShowEvents(): bool
  3850.     {
  3851.         return $this->show_events;
  3852.     }
  3853.     public function setShowEvents($show_events): void
  3854.     {
  3855.         $this->show_events $show_events;
  3856.     }
  3857.     public function getGroupsByInscribed(): array
  3858.     {
  3859.         if (empty($this->getInscritos())) {
  3860.             return [];
  3861.         }
  3862.         return array_unique($this->getInscritos()->filter(function (Inscrito $inscribed) {
  3863.             return !empty($inscribed->getAgrupacion());
  3864.         })->map(function (Inscrito $inscribed) {
  3865.             return $inscribed->getAgrupacion();
  3866.         })->toArray());
  3867.     }
  3868.     public function isAdvancedHcpCalculation(): bool
  3869.     {
  3870.         return $this->advanced_hcp_calculation;
  3871.     }
  3872.     public function setAdvancedHcpCalculation(bool $advanced_hcp_calculation): self
  3873.     {
  3874.         $this->advanced_hcp_calculation $advanced_hcp_calculation;
  3875.         return $this;
  3876.     }
  3877.     public function isApplyAverageHcp(): bool
  3878.     {
  3879.         return $this->apply_average_hcp;
  3880.     }
  3881.     public function setApplyAverageHcp(bool $apply_average_hcp): self
  3882.     {
  3883.         $this->apply_average_hcp $apply_average_hcp;
  3884.         return $this;
  3885.     }
  3886.     public function getLowerHandicapsToUse(): int
  3887.     {
  3888.         return $this->lower_handicaps_to_use ?? self::DEFAULT_LOWER_HANDICAPS_TO_USE;
  3889.     }
  3890.     public function setLowerHandicapsToUse(int $lower_handicaps_to_use): self
  3891.     {
  3892.         $this->lower_handicaps_to_use $lower_handicaps_to_use;
  3893.         return $this;
  3894.     }
  3895.     public function getCanPutBall(): ?bool
  3896.     {
  3897.         return $this->can_put_ball;
  3898.     }
  3899.     public function setCanPutBall(?bool $can_put_ball): self
  3900.     {
  3901.         $this->can_put_ball $can_put_ball;
  3902.         return $this;
  3903.     }
  3904.     public function getCanUseMeters(): ?bool
  3905.     {
  3906.         return $this->can_use_meters;
  3907.     }
  3908.     public function setCanUseMeters(?bool $can_use_meters): self
  3909.     {
  3910.         $this->can_use_meters $can_use_meters;
  3911.         return $this;
  3912.     }
  3913.     public function getCanGiveAdvice(): ?bool
  3914.     {
  3915.         return $this->can_give_advice;
  3916.     }
  3917.     public function setCanGiveAdvice(?bool $can_give_advice): self
  3918.     {
  3919.         $this->can_give_advice $can_give_advice;
  3920.         return $this;
  3921.     }
  3922.     public function getEcardInitialMessage(): ?string
  3923.     {
  3924.         return $this->ecard_initial_message;
  3925.     }
  3926.     public function setEcardInitialMessage(?string $ecard_initial_message): self
  3927.     {
  3928.         $this->ecard_initial_message $ecard_initial_message;
  3929.         return $this;
  3930.     }
  3931.     public function isHoleDistance(): bool
  3932.     {
  3933.         return $this->hole_distance;
  3934.     }
  3935.     public function getHoleDistance(): bool
  3936.     {
  3937.         return $this->hole_distance;
  3938.     }
  3939.     public function setHoleDistance(bool $hole_distance): self
  3940.     {
  3941.         $this->hole_distance $hole_distance;
  3942.         return $this;
  3943.     }
  3944.     /**
  3945.      * @return Collection<int, RfcCompetition>
  3946.      */
  3947.     public function getRfcCompetitions(): Collection
  3948.     {
  3949.         return $this->rfcCompetitions;
  3950.     }
  3951.     public function addRfcCompetition(RfcCompetition $rfcCompetition): self
  3952.     {
  3953.         if (!$this->rfcCompetitions->contains($rfcCompetition)) {
  3954.             $this->rfcCompetitions[] = $rfcCompetition;
  3955.             $rfcCompetition->setCompetition($this);
  3956.         }
  3957.         return $this;
  3958.     }
  3959.     public function removeRfcCompetition(RfcCompetition $rfcCompetition): self
  3960.     {
  3961.         if ($this->rfcCompetitions->removeElement($rfcCompetition)) {
  3962.             // set the owning side to null (unless already changed)
  3963.             if ($rfcCompetition->getCompetition() === $this) {
  3964.                 $rfcCompetition->setCompetition(null);
  3965.             }
  3966.         }
  3967.         return $this;
  3968.     }
  3969. }