src/Entity/Backend/Competicion.php line 41

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