src/Entity/Event.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Business\Context;
  4. use App\Business\ContextableEntity;
  5. use App\Business\EventCategoryProvider;
  6. use App\Business\LocalizableEntity;
  7. use App\Application\Sonata\MediaBundle\Entity\Gallery;
  8. use App\Application\Sonata\MediaBundle\Entity\Media;
  9. use Behat\Transliterator\Transliterator;
  10. use DateTime;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\Common\Collections\Collection;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
  15. use Symfony\Component\Validator\Constraints as Assert;
  16. use JMS\Serializer\Annotation as Serializer;
  17. /**
  18.  * Event
  19.  *
  20.  * @ORM\Table(name="event")
  21.  * @ORM\Entity(repositoryClass="App\Repository\EventRepository")
  22.  */
  23. class Event extends LocalizableEntity implements ContextableEntity
  24. {
  25.     use \Gedmo\Timestampable\Traits\TimestampableEntity;
  26.     use BlameableEntity;
  27.     use SoftDeleteableEntity;
  28.     const PROP_EVENT 'event';
  29.     const PROP_EVENT_NO 'eventNo';
  30.     const EVENT_NO_CATEGORY "no-category";
  31.     const EVENT_WORLDFEED_CATEGORY "worldfeed";
  32.     const EVENT_WORLDLINK_CATEGORY "worldlink";
  33.     /** Open Booking Status */
  34.     const OPEN_BOOKING_DISABLED false;
  35.     const OPEN_BOOKING_ENABLED true;
  36.     public $currentUserIsFollower false;
  37.     /**
  38.      * @var int
  39.      *
  40.      * @ORM\Column(name="id", type="integer")
  41.      * @ORM\Id
  42.      * @ORM\GeneratedValue(strategy="AUTO")
  43.      * @Serializer\Groups({"list"})
  44.      */
  45.     private $id;
  46.     /**
  47.      * FROM NEOS
  48.      *
  49.      * @var string
  50.      * @ORM\Column(name="event_no", type="string", length=255)
  51.      * @Serializer\Groups({"list"})
  52.      */
  53.     private $eventNo;
  54.     /**
  55.      * FROM NEOS
  56.      *
  57.      * @var string
  58.      * @ORM\Column(name="category", type="string", length=255, nullable=true)
  59.      * @Serializer\Groups({"list"})
  60.      */
  61.     private $category;
  62.     /**
  63.      * FROM NEOS
  64.      *
  65.      * @var string
  66.      * @ORM\Column(name="category_code", type="string", length=255, nullable=true)
  67.      * @Serializer\Groups({"list"})
  68.      */
  69.     private $categoryCode;
  70.     /**
  71.      * FROM NEOS
  72.      *
  73.      * @var string
  74.      * @ORM\Column(name="sub_category", type="string", length=255, nullable=true)
  75.      * @Serializer\Groups({"list"})
  76.      */
  77.     private $subCategory;
  78.     /**
  79.      * FROM NEOS
  80.      *
  81.      * @var string
  82.      * @ORM\Column(name="sub_category_code", type="string", length=255, nullable=true)
  83.      * @Serializer\Groups({"list"})
  84.      */
  85.     private $subCategoryCode;
  86.     /**
  87.      * FROM NEOS
  88.      *
  89.      * @var string
  90.      * @ORM\Column(name="venue", type="string", length=255, nullable=true)
  91.      * @Serializer\Groups({"list"})
  92.      */
  93.     private $venue;
  94.     /**
  95.      * FROM NEOS
  96.      *
  97.      * @var string
  98.      * @ORM\Column(name="title", type="string", length=255)
  99.      * @Serializer\Groups({"list"})
  100.      */
  101.     private $title;
  102.     /**
  103.      * @var string
  104.      * @Assert\Length(max=500)
  105.      * @ORM\Column(name="description", type="text", nullable=true)
  106.      * @Serializer\Groups({"list"})
  107.      */
  108.     private $description;
  109.     /**
  110.      * @var string
  111.      * @ORM\Column(name="long_description", type="text", nullable=true)
  112.      * @Serializer\Groups({"list"})
  113.      */
  114.     private $longDescription;
  115.     /**
  116.      * FROM NEOS
  117.      *
  118.      * @var string
  119.      * @ORM\Column(name="language_graphics", type="text", nullable=true)
  120.      */
  121.     private $languageOfGraphics;
  122.     /**
  123.      * FROM NEOS
  124.      *
  125.      * @var string
  126.      * @ORM\Column(name="signal_description", type="text", nullable=true)
  127.      */
  128.     private $signalDescription;
  129.     /**
  130.      * @var string
  131.      * @ORM\Column(name="additional_infos", type="text", nullable=true)
  132.      */
  133.     private $additionalInfos;
  134.     /**
  135.      * @var string
  136.      * @ORM\Column(name="others", type="text", nullable=true)
  137.      */
  138.     private $others;
  139.     /**
  140.      * FROM NEOS
  141.      * @ORM\Column(name="start_date", type="date")
  142.      * @Serializer\Groups({"list"})
  143.      */
  144.     private $startDate;
  145.     /**
  146.      * FROM NEOS
  147.      * @ORM\Column(name="deadline_date", type="date",nullable=true)
  148.      * @Serializer\Groups({"list"})
  149.      */
  150.     private $deadlineDate;
  151.     /**
  152.      * set
  153.      * FROM NEOS
  154.      * @ORM\Column(name="facilities_deadline_date", type="date",nullable=true)
  155.      */
  156.     private $facilitiesDeadlineDate;
  157.     /**
  158.      * FROM NEOS
  159.      * @ORM\Column(name="end_date", type="date")
  160.      * @Serializer\Groups({"list"})
  161.      */
  162.     private $endDate;
  163.     /**
  164.      * FROM NEOS
  165.      * @ORM\Column(name="status", type="string", length=50)
  166.      * @Serializer\Groups({"list"})
  167.      */
  168.     private $status;
  169.     /**
  170.      * FROM NEOS. Data updated in the synchronization process.
  171.      * @ORM\Column(name="visible_backend", type="boolean", nullable=true, options={"default" : false})
  172.      */
  173.     private $visibleBackend;
  174.     /**
  175.      * FROM NEOS
  176.      * @ORM\Column(name="visible_frontend", type="boolean", nullable=true, options={"default" : false})
  177.      */
  178.     private $visibleFrontend;
  179.     /**
  180.      * FROM NEOS
  181.      * @ORM\Column(name="event_type", type="string", length=10)
  182.      * @Serializer\Groups({"list"})
  183.      */
  184.     private $eventType;
  185.     /**
  186.      * FROM NEOS
  187.      * @ORM\Column(name="responsible_office", type="string", length=100, nullable=true)
  188.      */
  189.     private $responsibleOffice;
  190.     /**
  191.      * FROM NEOS
  192.      * @ORM\Column(name="responsible_code", type="string", length=100, nullable=true)
  193.      */
  194.     private $responsibleCode;
  195.     /**
  196.      * FROM NEOS
  197.      * @ORM\Column(name="responsible_details", type="text", nullable=true)
  198.      */
  199.     private $responsibleDetails;
  200.     /**
  201.      * FROM NEOS
  202.      * @ORM\Column(name="contact_on_site", type="string", length=100, nullable=true)
  203.      */
  204.     private $contactOnSite;
  205.     /**
  206.      * FROM NEOS
  207.      * @ORM\Column(name="contact_on_site_details", type="text", nullable=true)
  208.      */
  209.     private $contactOnSiteDetails;
  210.     /**
  211.      * FROM NEOS
  212.      * @ORM\Column(name="is_partial_timing_allowed", type="boolean", nullable=true)
  213.      */
  214.     private $isPartialTimingAllowed;
  215.     /**
  216.      * FROM NEOS
  217.      * @ORM\Column(name="is_uni_order_allowed", type="boolean", nullable=true)
  218.      */
  219.     private $isUniOrderAllowed;
  220.     /**
  221.      * FROM NEOS
  222.      * @ORM\Column(name="rhs_booking_allowed", type="boolean", nullable=true)
  223.      */
  224.     private $rhsBookingAllowed false;
  225.     /**
  226.      * @var boolean
  227.      * @ORM\Column(name="show_unis_in_transmissions", type="boolean", nullable = true)
  228.      */
  229.     private $showUnisInTransmissions true;
  230.     /**
  231.      * @var boolean
  232.      * @ORM\Column(name="neos_valid_configuration", type="boolean", nullable = true)
  233.      */
  234.     private $neosValidConfiguration true;
  235.     /**
  236.      * @var text
  237.      * @ORM\Column(name="neos_configuration_note", type="text", nullable=true)
  238.      */
  239.     private $neosConfigurationNote;
  240.     /**
  241.      * @var boolean
  242.      * @ORM\Column(name="show_booking_contact", type="boolean", nullable = true)
  243.      */
  244.     private $showBookingContact true;
  245.     /**
  246.      * @var boolean
  247.      * @ORM\Column(name="show_past_transmissions", type="boolean", nullable = true)
  248.      */
  249.     private $showPastTransmissions true;
  250.     /**
  251.      * @var boolean
  252.      * @ORM\Column(name="show_news_operation_contact", type="boolean", nullable = true)
  253.      */
  254.     private $showNewsOperationContact false;
  255.     /**
  256.      * FROM NEOS
  257.      * To be used to activate or not the rhs bookin
  258.      * @ORM\Column(name="priority", type="integer", nullable=true)
  259.      */
  260.     private $priority;
  261.     /**
  262.      * @ORM\Column(name="city_code", type="string", length=100, nullable=true)
  263.      * @Serializer\Groups({"list"})
  264.      */
  265.     private $cityCode;
  266.     /**
  267.      * @ORM\Column(name="city_name", type="string", length=255, nullable=true)
  268.      * @Serializer\Groups({"list"})
  269.      */
  270.     private $cityName;
  271.     /**
  272.      * @ORM\Column(name="country_city_code", type="string", length=256, nullable=true)
  273.      * @Serializer\Groups({"list"})
  274.      */
  275.     private $countryCityCode;
  276.     /**
  277.      * @ORM\Column(name="country_code", type="string", length=100, nullable=true)
  278.      * @Serializer\Groups({"list"})
  279.      */
  280.     private $countryCode;
  281.     /**
  282.      * @ORM\Column(name="country_name", type="string", length=255, nullable=true)
  283.      * @Serializer\Groups({"list"})
  284.      */
  285.     private $countryName;
  286.     /**
  287.      * Used for RHS to map event to an application
  288.      *
  289.      * @var string
  290.      * @ORM\Column(name="entra_app_id", type="string", length=255, nullable=true)
  291.      */
  292.     private $entraAppId;
  293.     /**
  294.      * @ORM\OneToMany(targetEntity="App\Entity\Image", mappedBy="event")
  295.      */
  296.     private $images;
  297.     /**
  298.      * @return mixed
  299.      */
  300.     public function getImages()
  301.     {
  302.         return $this->images;
  303.     }
  304.     /**
  305.      * @param mixed $images
  306.      */
  307.     public function setImages($images)
  308.     {
  309.         $this->images $images;
  310.     }
  311.     /**
  312.      * Add image
  313.      *
  314.      * @param Image $image
  315.      *
  316.      * @return Event
  317.      */
  318.     public function addImage(Image $image)
  319.     {
  320.         $image->setEvent($this);
  321.         $this->images[] = $image;
  322.         return $this;
  323.     }
  324.     /**
  325.      * Remove image
  326.      *
  327.      * @param Image $image
  328.      */
  329.     public function removeImage(Image $image)
  330.     {
  331.         $this->images->removeImage($image);
  332.     }
  333.     /**
  334.      * @ORM\OneToMany(targetEntity="App\Entity\Document", mappedBy="event")
  335.      */
  336.     private $documents;
  337.     /**
  338.      * For RHS, contains entra id
  339.      *
  340.      * @var string
  341.      * @ORM\Column(name="entra_role_id_admin", type="string", length=255, nullable=true)
  342.      */
  343.     private $entraRoleIdAdmin;
  344.     /**
  345.      * For RHS, contains entra id
  346.      *
  347.      * @var string
  348.      * @ORM\Column(name="entra_role_id_super_user", type="string", length=255, nullable=true)
  349.      */
  350.     private $entraRoleIdSuperUser;
  351.     /**
  352.      * For RHS, contains entra id
  353.      *
  354.      * @var string
  355.      * @ORM\Column(name="entra_role_id_user", type="string", length=255, nullable=true)
  356.      */
  357.     private $entraRoleIdUser;
  358.     /**
  359.      * For RHS, contains entra id
  360.      *
  361.      * @var string
  362.      * @ORM\Column(name="entra_role_id_reader", type="string", length=255, nullable=true)
  363.      */
  364.     private $entraRoleIdReader;
  365.     /**
  366.      * EDITABLE IN ENET
  367.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}, fetch="LAZY")
  368.      * @ORM\JoinColumns({
  369.      *     @ORM\JoinColumn(name="banner_id", referencedColumnName="id")})
  370.      */
  371.     private $banner;
  372.     /**
  373.      * EDITABLE IN ENET
  374.      * Banner for RHS
  375.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}, fetch="LAZY")
  376.      * @ORM\JoinColumns({
  377.      *     @ORM\JoinColumn(name="rhs_banner_id", referencedColumnName="id")})
  378.      */
  379.     private $rhsBanner;
  380.     /**
  381.      * EDITABLE IN ENET
  382.      *
  383.      * @var string
  384.      * @ORM\Column(name="photo_credit",type="string", length=255, nullable=true)
  385.      */
  386.     private $photoCredit;
  387.     /**
  388.      * EDITABLE IN ENET
  389.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}, fetch="LAZY")
  390.      * @ORM\JoinColumns({
  391.      *     @ORM\JoinColumn(name="image_id", referencedColumnName="id")})
  392.      *
  393.      */
  394.     private $image;
  395.     /**
  396.      * FROM NEOS
  397.      *
  398.      * @var ArrayCollection
  399.      * @ORM\OneToMany(targetEntity="App\Entity\Node", mappedBy="event", cascade={"all"})
  400.      * @ORM\OrderBy({"title" = "ASC"})
  401.      */
  402.     private $nodes;
  403.     /**
  404.      * FROM NEOS
  405.      *
  406.      * @var ArrayCollection
  407.      * @ORM\OneToMany(targetEntity="App\Entity\WorldFeed", mappedBy="event", cascade={"all"})
  408.      * @ORM\OrderBy({"startDate" = "ASC"})
  409.      */
  410.     private $worldFeeds;
  411.     /**
  412.      * EDITABLE IN ENET
  413.      *
  414.      * @var ArrayCollection
  415.      * @ORM\OneToMany(targetEntity="App\Entity\EventArticle", mappedBy="event", cascade={"all"})
  416.      * @ORM\OrderBy({"updatedAt" = "DESC"})
  417.      */
  418.     private $articles;
  419.     /**
  420.      * EDITABLE IN ENET
  421.      *
  422.      * @var ArrayCollection
  423.      * @ORM\OneToMany(targetEntity="App\Entity\QuickLink", mappedBy="event", cascade={"persist","remove"})
  424.      */
  425.     private $quickLinks;
  426.     /**
  427.      * FROM NEOS. Updating in the synchronization process.
  428.      * @ORM\Column(name="contains_worldfeed", type="boolean", nullable=true, options={"default" : false})
  429.      */
  430.     private $containsWorldFeed false;
  431.     /**
  432.      * FROM NEOS. Updating in the synchronization process.
  433.      * @ORM\Column(name="contains_worldlink", type="boolean", nullable=true, options={"default" : false})
  434.      */
  435.     private $containsWorldLink false;
  436.     /**
  437.      * FROM NEOS. Updating in the synchronization process.
  438.      * @ORM\Column(name="media", type="string", length=50, nullable=true)
  439.      */
  440.     private $media;
  441.     /**
  442.      * FROM NEOS. Updating in the synchronization process.
  443.      * @ORM\Column(name="booking_enabled", type="boolean", nullable=true, options={"default" : false})
  444.      */
  445.     private $bookingEnabled Event::OPEN_BOOKING_DISABLED;
  446.     /**
  447.      * EDITABLE IN ENET
  448.      *
  449.      * @var string
  450.      * @ORM\Column(name="rate_card", type="text", nullable=true)
  451.      */
  452.     private $rateCard;
  453.     /**
  454.      * EDITABLE IN ENET
  455.      *
  456.      * @var string
  457.      * @ORM\Column(name="cancellation_policy", type="text", nullable=true)
  458.      */
  459.     private $cancellationPolicy;
  460.     /**
  461.      * EDITABLE IN ENET
  462.      * @ORM\ManyToOne(targetEntity="App\Application\Sonata\MediaBundle\Entity\Gallery", cascade={"persist"}, fetch="LAZY")
  463.      */
  464.     private $gallery;
  465.     /**
  466.      * FROM NEOS
  467.      * @ORM\Column(name="website", type="string", length=255, nullable=true)
  468.      */
  469.     private $website;
  470.     /**
  471.      * @var EventGroupContactsHost $eventGroupContactsHost
  472.      * @ORM\OneToOne(targetEntity="EventGroupContactsHost", cascade={"persist"})
  473.      */
  474.     private $eventGroupContactsHost;
  475.     /**
  476.      * FROM NEOS
  477.      *
  478.      * @var EventGroupContactsAccreditation $eventGroupContactsAccreditation
  479.      * @ORM\OneToOne(targetEntity="EventGroupContactsAccreditation", cascade={"persist"})
  480.      */
  481.     private $eventGroupContactsAccreditation;
  482.     /**
  483.      * FROM NEOS
  484.      *
  485.      * @var EventGroupContactsOnSite $eventGroupContactsOnSite
  486.      * @ORM\OneToOne(targetEntity="EventGroupContactsOnSite", cascade={"persist"})
  487.      */
  488.     private $eventGroupContactsOnSite;
  489.     /**
  490.      * FROM NEOS
  491.      *
  492.      * @var EventGroupContactsRights $eventGroupContactsRights
  493.      * @ORM\OneToOne(targetEntity="EventGroupContactsRights", cascade={"persist"})
  494.      */
  495.     private $eventGroupContactsRights;
  496.     /**
  497.      * FROM NEOS
  498.      *
  499.      * @var EventGroupContactsOthers $eventGroupContactsOthers
  500.      * @ORM\OneToOne(targetEntity="EventGroupContactsOthers", cascade={"persist"})
  501.      */
  502.     private $eventGroupContactsOthers;
  503.     /**
  504.      * Editable in ENET
  505.      *
  506.      * @var EventOpsProd $eventOpsProd
  507.      * @ORM\OneToOne(targetEntity="App\Entity\EventOpsProd", cascade={"persist"}, inversedBy="event")
  508.      */
  509.     private $eventOpsProd;
  510.     /**
  511.      * EDITABLE IN ENET
  512.      *
  513.      * @var string
  514.      * @ORM\Column(name="rate_card_member", type="text", nullable=true)
  515.      */
  516.     private $rateCardMember;
  517.     /**
  518.      * @var string
  519.      * @ORM\Column(name="worldfeed_description", type="text", nullable=true)
  520.      */
  521.     private $worldfeedDescription;
  522.     /**
  523.      * @ORM\ManyToMany(targetEntity="App\Entity\Event")
  524.      * @ORM\JoinTable(name="related_events",
  525.      *      joinColumns={@ORM\JoinColumn(name="event_id", referencedColumnName="id")},
  526.      *      inverseJoinColumns={@ORM\JoinColumn(name="relatedEvent_id", referencedColumnName="id")}
  527.      *   )
  528.      */
  529.     private $relatedEvents;
  530.     /**
  531.      * Constructor
  532.      */
  533.     public function __construct()
  534.     {
  535.         $this->documents = new ArrayCollection();
  536.         $this->images = new ArrayCollection();
  537.         $this->articles = new ArrayCollection();
  538.         $this->quickLinks = new ArrayCollection();
  539.         $this->worldFeeds = new ArrayCollection();
  540.         $this->eventGroupContactsAccreditation = new EventGroupContactsAccreditation();
  541.         $this->eventGroupContactsRights = new EventGroupContactsRights();
  542.         $this->eventGroupContactsOthers = new EventGroupContactsOthers();
  543.         $this->eventGroupContactsHost = new EventGroupContactsHost();
  544.         $this->eventGroupContactsOnSite = new EventGroupContactsOnSite();
  545.         $this->eventOpsProd = new EventOpsProd();
  546.         $this->eventOpsProd->setEvent($this);
  547.         $this->relatedEvents = new ArrayCollection();
  548.     }
  549.     /**
  550.      * @return mixed
  551.      */
  552.     public function getFacilitiesDeadlineDate()
  553.     {
  554.         return $this->facilitiesDeadlineDate;
  555.     }
  556.     /**
  557.      * @param mixed $facilitiesDeadlineDate
  558.      */
  559.     public function setFacilitiesDeadlineDate($facilitiesDeadlineDate): void
  560.     {
  561.         $this->facilitiesDeadlineDate $facilitiesDeadlineDate;
  562.     }
  563.     /**
  564.      * @return mixed
  565.      */
  566.     public function getVisibleBackend()
  567.     {
  568.         return $this->visibleBackend;
  569.     }
  570.     /**
  571.      * @param mixed $visibleBackend
  572.      */
  573.     public function setVisibleBackend($visibleBackend): void
  574.     {
  575.         $this->visibleBackend $visibleBackend;
  576.     }
  577.     /**
  578.      * @return mixed
  579.      */
  580.     public function getContainsWorldFeed()
  581.     {
  582.         return $this->containsWorldFeed;
  583.     }
  584.     /**
  585.      * @param mixed $containsWorldFeed
  586.      */
  587.     public function setContainsWorldFeed($containsWorldFeed): void
  588.     {
  589.         $this->containsWorldFeed $containsWorldFeed;
  590.     }
  591.     /**
  592.      * @return mixed
  593.      */
  594.     public function getContainsWorldLink()
  595.     {
  596.         return $this->containsWorldLink;
  597.     }
  598.     /**
  599.      * @param mixed $containsWorldLink
  600.      */
  601.     public function setContainsWorldLink($containsWorldLink): void
  602.     {
  603.         $this->containsWorldLink $containsWorldLink;
  604.     }
  605.     /**
  606.      * @return mixed
  607.      */
  608.     public function getMedia()
  609.     {
  610.         return $this->media;
  611.     }
  612.     /**
  613.      * @param mixed $media
  614.      */
  615.     public function setMedia($media): void
  616.     {
  617.         $this->media $media;
  618.     }
  619.     public function setEventNotVisibleAtAll()
  620.     {
  621.         $this->setBookingEnabled(false);
  622.         $this->setVisibleFrontend(false);
  623.         $this->setVisibleBackend(false);
  624.     }
  625.     /**
  626.      * @return mixed
  627.      */
  628.     public function getVisibleFrontend()
  629.     {
  630.         return $this->visibleFrontend;
  631.     }
  632.     /**
  633.      * @param mixed $visibleFrontend
  634.      */
  635.     public function setVisibleFrontend($visibleFrontend): void
  636.     {
  637.         $this->visibleFrontend $visibleFrontend;
  638.     }
  639.     /**
  640.      * @return EventGroupContactsOnSite
  641.      */
  642.     public function getEventGroupContactsOnSite(): EventGroupContactsOnSite
  643.     {
  644.         if ($this->eventGroupContactsOnSite == null) {
  645.             $this->eventGroupContactsOnSite = new EventGroupContactsOnSite();
  646.         }
  647.         return $this->eventGroupContactsOnSite;
  648.     }
  649.     /**
  650.      * @param EventGroupContactsOnSite $eventGroupContactsOnSite
  651.      */
  652.     public function setEventGroupContactsOnSite(EventGroupContactsOnSite $eventGroupContactsOnSite): void
  653.     {
  654.         $this->eventGroupContactsOnSite $eventGroupContactsOnSite;
  655.     }
  656.     /**
  657.      * @return string
  658.      */
  659.     public function getOthers(): ?string
  660.     {
  661.         return $this->others;
  662.     }
  663.     /**
  664.      * @param string $others
  665.      */
  666.     public function setOthers(string $others): void
  667.     {
  668.         $this->others $others;
  669.     }
  670.     /**
  671.      * @return EventOpsProd
  672.      */
  673.     public function getEventOpsProd(): ?EventOpsProd
  674.     {
  675.         return $this->eventOpsProd;
  676.     }
  677.     /**
  678.      * @param EventOpsProd $eventOpsProd
  679.      */
  680.     public function setEventOpsProd(EventOpsProd $eventOpsProd): void
  681.     {
  682.         $eventOpsProd->setEvent($this);
  683.         $this->eventOpsProd $eventOpsProd;
  684.     }
  685.     /**
  686.      * @return string
  687.      */
  688.     public function getLanguageOfGraphics(): ?string
  689.     {
  690.         return $this->languageOfGraphics;
  691.     }
  692.     /**
  693.      * @param string $languageOfGraphics
  694.      */
  695.     public function setLanguageOfGraphics(string $languageOfGraphics null): void
  696.     {
  697.         $this->languageOfGraphics $languageOfGraphics;
  698.     }
  699.     /**
  700.      * @return string
  701.      */
  702.     public function getSignalDescription(): ?string
  703.     {
  704.         return $this->signalDescription;
  705.     }
  706.     /**
  707.      * @param string $signalDescription
  708.      */
  709.     public function setSignalDescription(string $signalDescription null): void
  710.     {
  711.         $this->signalDescription $signalDescription;
  712.     }
  713.     /**
  714.      * @return string
  715.      */
  716.     public function getAdditionalInfos(): ?string
  717.     {
  718.         return $this->additionalInfos;
  719.     }
  720.     /**
  721.      * @param string $additionalInfos
  722.      */
  723.     public function setAdditionalInfos(string $additionalInfos null): void
  724.     {
  725.         $this->additionalInfos $additionalInfos;
  726.     }
  727.     /**
  728.      * @return string
  729.      */
  730.     public function getCancellationPolicy(): ?string
  731.     {
  732.         return $this->cancellationPolicy;
  733.     }
  734.     /**
  735.      * @param string $cancellationPolicy
  736.      */
  737.     public function setCancellationPolicy(string $cancellationPolicy null): void
  738.     {
  739.         $this->cancellationPolicy $cancellationPolicy;
  740.     }
  741.     /**
  742.      * @return string
  743.      */
  744.     public function getStatus()
  745.     {
  746.         return $this->status;
  747.     }
  748.     /**
  749.      * Set status
  750.      *
  751.      * @param string $status
  752.      *
  753.      * @return Event
  754.      */
  755.     public function setStatus($status)
  756.     {
  757.         $this->status $status;
  758.         return $this;
  759.     }
  760.     public function updateCountryCityCode()
  761.     {
  762.         $this->countryCityCode Location::buildCountryCityCode($this->getCountryCode(), $this->getCityCode());
  763.     }
  764.     /**
  765.      * @return mixed
  766.      */
  767.     public function getCountryCode()
  768.     {
  769.         return $this->countryCode;
  770.     }
  771.     /**
  772.      * Set countryCode
  773.      *
  774.      * @param string $countryCode
  775.      *
  776.      * @return Event
  777.      */
  778.     public function setCountryCode($countryCode)
  779.     {
  780.         $this->countryCode $countryCode;
  781.         return $this;
  782.     }
  783.     /**
  784.      * @return mixed
  785.      */
  786.     public function getCityCode()
  787.     {
  788.         return $this->cityCode;
  789.     }
  790.     /**
  791.      * Set cityCode
  792.      *
  793.      * @param string $cityCode
  794.      *
  795.      * @return Event
  796.      */
  797.     public function setCityCode($cityCode)
  798.     {
  799.         $this->cityCode $cityCode;
  800.         return $this;
  801.     }
  802.     /**
  803.      * @return EventGroupContactsAccreditation
  804.      */
  805.     public function getEventGroupContactsAccreditation(): ?EventGroupContactsAccreditation
  806.     {
  807.         return $this->eventGroupContactsAccreditation;
  808.     }
  809.     /**
  810.      * @param EventGroupContactsAccreditation $eventGroupContactsAccreditation
  811.      */
  812.     public function setEventGroupContactsAccreditation(EventGroupContactsAccreditation $eventGroupContactsAccreditation null): void
  813.     {
  814.         $this->eventGroupContactsAccreditation $eventGroupContactsAccreditation;
  815.     }
  816.     /**
  817.      * @return EventGroupContactsRights
  818.      */
  819.     public function getEventGroupContactsRights(): ?EventGroupContactsRights
  820.     {
  821.         return $this->eventGroupContactsRights;
  822.     }
  823.     /**
  824.      * @param EventGroupContactsRights $eventGroupContactsRights
  825.      */
  826.     public function setEventGroupContactsRights(EventGroupContactsRights $eventGroupContactsRights null): void
  827.     {
  828.         $this->eventGroupContactsRights $eventGroupContactsRights;
  829.     }
  830.     /**
  831.      * @return EventGroupContactsOthers
  832.      */
  833.     public function getEventGroupContactsOthers(): ?EventGroupContactsOthers
  834.     {
  835.         return $this->eventGroupContactsOthers;
  836.     }
  837.     /**
  838.      * @param EventGroupContactsOthers $eventGroupContactsOthers
  839.      */
  840.     public function setEventGroupContactsOthers(EventGroupContactsOthers $eventGroupContactsOthers null): void
  841.     {
  842.         $this->eventGroupContactsOthers $eventGroupContactsOthers;
  843.     }
  844.     /**
  845.      * @return EventGroupContactsHost
  846.      */
  847.     public function getEventGroupContactsHost(): ?EventGroupContactsHost
  848.     {
  849.         return $this->eventGroupContactsHost;
  850.     }
  851.     /**
  852.      * @param EventGroupContactsHost $eventGroupContactsHost
  853.      */
  854.     public function setEventGroupContactsHost(EventGroupContactsHost $eventGroupContactsHost null): void
  855.     {
  856.         $this->eventGroupContactsHost $eventGroupContactsHost;
  857.     }
  858.     /**
  859.      * @return bool true is the event is bookable
  860.      */
  861.     public function isBookable(): bool
  862.     {
  863.         return ($this->getBookingEnabled());
  864.     }
  865.     /**
  866.      * @return boolean
  867.      */
  868.     public function getBookingEnabled(): bool
  869.     {
  870.         return $this->bookingEnabled != null && $this->bookingEnabled;
  871.     }
  872.     /**
  873.      * @param boolean $bookingEnabled
  874.      *
  875.      * @return Event
  876.      */
  877.     public function setBookingEnabled($bookingEnabled)
  878.     {
  879.         $this->bookingEnabled $bookingEnabled;
  880.         return $this;
  881.     }
  882.     public function getActiveNodes()
  883.     {
  884.         $res = [];
  885.         $nodes $this->getNodes();
  886.         if (!empty($nodes)) {
  887.             /**
  888.              * @var Node $node
  889.              */
  890.             foreach ($nodes as $node) {
  891.                 if (EntityInterface::STATUS_ACTIVE == $node->getStatus()) {
  892.                     $res[] = $node;
  893.                 }
  894.             }
  895.         }
  896.         return $res;
  897.     }
  898.     /**
  899.      * Get  all nodes even nodes that are inactive
  900.      *
  901.      * @return Collection
  902.      */
  903.     public function getNodes()
  904.     {
  905.         return $this->nodes;
  906.     }
  907.     public function getActiveWorldFeeds(?bool $includePastItems true, ?array $worldfeedTransmissionToBeDisplayedInFlyer null)
  908.     {
  909.         $res = [];
  910.         $worldFeeds $this->getWorldFeeds();
  911.         if (!empty($worldFeeds)) {
  912.             /**
  913.              * @var WorldFeed $worldFeed
  914.              */
  915.             foreach ($worldFeeds as $worldFeed) {
  916.                 if ($includePastItems) {
  917.                     if (EntityInterface::STATUS_ACTIVE == $worldFeed->status) {
  918.                         if (empty($worldfeedTransmissionToBeDisplayedInFlyer) || (!empty($worldfeedTransmissionToBeDisplayedInFlyer) && in_array($worldFeed->transmissionNo$worldfeedTransmissionToBeDisplayedInFlyer))) {
  919.                             $res[] = $worldFeed;
  920.                         }
  921.                     }
  922.                 } else {
  923.                     if (EntityInterface::STATUS_ACTIVE == $worldFeed->status && $worldFeed->endDate > new DateTime('today')) {
  924.                         if (empty($worldfeedTransmissionToBeDisplayedInFlyer) || (!empty($worldfeedTransmissionToBeDisplayedInFlyer) && in_array($worldFeed->transmissionNo$worldfeedTransmissionToBeDisplayedInFlyer))) {
  925.                             $res[] = $worldFeed;
  926.                         }
  927.                     }
  928.                 }
  929.             }
  930.         }
  931.         return $res;
  932.     }
  933.     /**
  934.      * @return Collection
  935.      */
  936.     public function getWorldFeeds(): Collection
  937.     {
  938.         return $this->worldFeeds;
  939.     }
  940.     /**
  941.      * @return string
  942.      */
  943.     public function getEntraRoleIdReader(): ?string
  944.     {
  945.         return $this->entraRoleIdReader;
  946.     }
  947.     /**
  948.      * @param string $entraRoleIdReader
  949.      */
  950.     public function setEntraRoleIdReader(string $entraRoleIdReader null): void
  951.     {
  952.         $this->entraRoleIdReader $entraRoleIdReader;
  953.     }
  954.     /**
  955.      * @return string
  956.      */
  957.     public function getPhotoCredit(): ?string
  958.     {
  959.         return $this->photoCredit;
  960.     }
  961.     /**
  962.      * @param string $photoCredit
  963.      */
  964.     public function setPhotoCredit(string $photoCredit null): void
  965.     {
  966.         $this->photoCredit $photoCredit;
  967.     }
  968.     /**
  969.      * @return string Context::EVENTS
  970.      */
  971.     public function getContextId(): string
  972.     {
  973.         return Context::EVENTS;
  974.     }
  975.     /**
  976.      * For unit test
  977.      *
  978.      * @param string $eventNo
  979.      * @param string $eventTitle
  980.      * @param string $status
  981.      * @param string $type
  982.      */
  983.     public function init(string $eventNostring $eventTitle nullstring $status nullstring $type null)
  984.     {
  985.         $this->eventNo $eventNo;
  986.         $this->title $eventTitle;
  987.         $this->status $status;
  988.         $this->eventType $type;
  989.     }
  990.     /**
  991.      * For unit test
  992.      *
  993.      * @param DateTime $startDate
  994.      * @param DateTime $entDate
  995.      */
  996.     public function initDate(DateTime $startDateDateTime $entDate)
  997.     {
  998.         $this->startDate $startDate;
  999.         $this->endDate $entDate;
  1000.     }
  1001.     /**
  1002.      * @return string
  1003.      */
  1004.     public function getVenue(): ?string
  1005.     {
  1006.         return $this->venue;
  1007.     }
  1008.     /**
  1009.      * Set venue
  1010.      *
  1011.      * @param string $venue
  1012.      *
  1013.      * @return Event
  1014.      */
  1015.     public function setVenue($venue)
  1016.     {
  1017.         $this->venue $venue;
  1018.         return $this;
  1019.     }
  1020.     /**
  1021.      * @return DateTime
  1022.      */
  1023.     public function getDeadlineDate()
  1024.     {
  1025.         return $this->deadlineDate;
  1026.     }
  1027.     /**
  1028.      * Set deadlineDate
  1029.      *
  1030.      * @param DateTime $deadlineDate
  1031.      *
  1032.      * @return Event
  1033.      */
  1034.     public function setDeadlineDate($deadlineDate)
  1035.     {
  1036.         $this->deadlineDate $deadlineDate;
  1037.         return $this;
  1038.     }
  1039.     /**
  1040.      * @return mixed
  1041.      */
  1042.     public function getPriority()
  1043.     {
  1044.         return $this->priority;
  1045.     }
  1046.     /**
  1047.      * @param mixed $priority
  1048.      */
  1049.     public function setPriority($priority)
  1050.     {
  1051.         $this->priority $priority;
  1052.     }
  1053.     /**
  1054.      * @return string
  1055.      */
  1056.     public function getCategoryCode(): ?string
  1057.     {
  1058.         return $this->categoryCode;
  1059.     }
  1060.     /**
  1061.      * Set categoryCode
  1062.      *
  1063.      * @param string $categoryCode
  1064.      *
  1065.      * @return Event
  1066.      */
  1067.     public function setCategoryCode($categoryCode)
  1068.     {
  1069.         $this->categoryCode $categoryCode;
  1070.         return $this;
  1071.     }
  1072.     /**
  1073.      * @return string
  1074.      */
  1075.     public function getSubCategoryCode(): ?string
  1076.     {
  1077.         return $this->subCategoryCode;
  1078.     }
  1079.     /**
  1080.      * Set subCategoryCode
  1081.      *
  1082.      * @param string $subCategoryCode
  1083.      *
  1084.      * @return Event
  1085.      */
  1086.     public function setSubCategoryCode($subCategoryCode)
  1087.     {
  1088.         $this->subCategoryCode $subCategoryCode;
  1089.         return $this;
  1090.     }
  1091.     /**
  1092.      * @return string
  1093.      */
  1094.     public function getCategory(): ?string
  1095.     {
  1096.         return $this->category;
  1097.     }
  1098.     /**
  1099.      * @param string $category
  1100.      */
  1101.     public function setCategory(string $category null)
  1102.     {
  1103.         $this->category $category;
  1104.     }
  1105.     /**
  1106.      * @return string
  1107.      */
  1108.     public function getCategoryDisplay(): ?string
  1109.     {
  1110.         return $this->category;
  1111.     }
  1112.     /**
  1113.      * @return string
  1114.      */
  1115.     public function getSubCategory(): ?string
  1116.     {
  1117.         return $this->subCategory;
  1118.     }
  1119.     /**
  1120.      * Set subCategory
  1121.      *
  1122.      * @param string $subCategory
  1123.      *
  1124.      * @return Event
  1125.      */
  1126.     public function setSubCategory($subCategory)
  1127.     {
  1128.         $this->subCategory $subCategory;
  1129.         return $this;
  1130.     }
  1131.     public function toString(): string
  1132.     {
  1133.         return "{id=" $this->id "}";
  1134.     }
  1135.     /**
  1136.      * @return string
  1137.      */
  1138.     public function getEntraRoleIdAdmin()
  1139.     {
  1140.         return $this->entraRoleIdAdmin;
  1141.     }
  1142.     /**
  1143.      * @param string $entraRoleIdAdmin
  1144.      */
  1145.     public function setEntraRoleIdAdmin(string $entraRoleIdAdmin)
  1146.     {
  1147.         $this->entraRoleIdAdmin $entraRoleIdAdmin;
  1148.     }
  1149.     /**
  1150.      * @return string
  1151.      */
  1152.     public function getEntraRoleIdSuperUser()
  1153.     {
  1154.         return $this->entraRoleIdSuperUser;
  1155.     }
  1156.     /**
  1157.      * @param string $entraRoleIdSuperUser
  1158.      */
  1159.     public function setEntraRoleIdSuperUser(string $entraRoleIdSuperUser)
  1160.     {
  1161.         $this->entraRoleIdSuperUser $entraRoleIdSuperUser;
  1162.     }
  1163.     /**
  1164.      * @return string
  1165.      */
  1166.     public function getEntraRoleIdUser()
  1167.     {
  1168.         return $this->entraRoleIdUser;
  1169.     }
  1170.     /**
  1171.      * @param string $entraRoleIdUser
  1172.      */
  1173.     public function setEntraRoleIdUser(string $entraRoleIdUser)
  1174.     {
  1175.         $this->entraRoleIdUser $entraRoleIdUser;
  1176.     }
  1177.     /**
  1178.      * FROM NEOS
  1179.      *
  1180.      * @return string
  1181.      */
  1182.     public function getEventNo()
  1183.     {
  1184.         return $this->eventNo;
  1185.     }
  1186.     /**
  1187.      * FROM NEOS
  1188.      * Set eventNo
  1189.      *
  1190.      * @param string $eventNo
  1191.      *
  1192.      * @return Event
  1193.      */
  1194.     public function setEventNo($eventNo)
  1195.     {
  1196.         $this->eventNo $eventNo;
  1197.         return $this;
  1198.     }
  1199.     /**
  1200.      * @return string
  1201.      */
  1202.     public function getTitle()
  1203.     {
  1204.         return $this->title;
  1205.     }
  1206.     /**
  1207.      * Set title
  1208.      *
  1209.      * @param string $title
  1210.      *
  1211.      * @return Event
  1212.      */
  1213.     public function setTitle($title)
  1214.     {
  1215.         $this->title $title;
  1216.         return $this;
  1217.     }
  1218.     /**
  1219.      * Get entraAppId
  1220.      *
  1221.      * @return string
  1222.      */
  1223.     public function getEntraAppId()
  1224.     {
  1225.         return $this->entraAppId;
  1226.     }
  1227.     /**
  1228.      * Set entraAppId
  1229.      *
  1230.      * @param string $entraAppId
  1231.      *
  1232.      * @return Event
  1233.      */
  1234.     public function setEntraAppId($entraAppId)
  1235.     {
  1236.         $this->entraAppId $entraAppId;
  1237.         return $this;
  1238.     }
  1239.     /**
  1240.      * Add document
  1241.      *
  1242.      * @param Document $document
  1243.      *
  1244.      * @return Event
  1245.      */
  1246.     public function addDocument(Document $document)
  1247.     {
  1248.         $document->setEvent($this);
  1249.         $this->documents[] = $document;
  1250.         return $this;
  1251.     }
  1252.     /**
  1253.      * Remove document
  1254.      *
  1255.      * @param Document $document
  1256.      */
  1257.     public function removeDocument(Document $document)
  1258.     {
  1259.         $this->documents->removeElement($document);
  1260.     }
  1261.     /**
  1262.      * Get documents
  1263.      *
  1264.      * @return Collection
  1265.      */
  1266.     public function getDocuments()
  1267.     {
  1268.         return $this->documents;
  1269.     }
  1270.     public function uploadImage()
  1271.     {
  1272.     }
  1273.     /**
  1274.      * Get banner
  1275.      *
  1276.      * @return Media
  1277.      */
  1278.     public function getBanner()
  1279.     {
  1280.         return $this->banner;
  1281.     }
  1282.     /**
  1283.      * Set banner
  1284.      *
  1285.      * @param Media $banner
  1286.      *
  1287.      * @return Event
  1288.      */
  1289.     public function setBanner(Media $banner null)
  1290.     {
  1291.         $this->banner $banner;
  1292.         return $this;
  1293.     }
  1294.     /**
  1295.      * Get rhsBanner
  1296.      *
  1297.      * @return Media
  1298.      */
  1299.     public function getRhsBanner()
  1300.     {
  1301.         return $this->rhsBanner;
  1302.     }
  1303.     /**
  1304.      * Set rhsBanner
  1305.      *
  1306.      * @param Media $rhsBanner
  1307.      *
  1308.      * @return Event
  1309.      */
  1310.     public function setRhsBanner(Media $rhsBanner null)
  1311.     {
  1312.         $this->rhsBanner $rhsBanner;
  1313.         return $this;
  1314.     }
  1315.     /**
  1316.      * Get image
  1317.      *
  1318.      * @return Media
  1319.      */
  1320.     public function getImage()
  1321.     {
  1322.         return $this->image;
  1323.     }
  1324.     /**
  1325.      * Set image
  1326.      *
  1327.      * @param Media $image
  1328.      *
  1329.      * @return Event
  1330.      */
  1331.     public function setImage(Media $image null)
  1332.     {
  1333.         $this->image $image;
  1334.         return $this;
  1335.     }
  1336.     /**
  1337.      * Get startDate
  1338.      *
  1339.      * @return DateTime
  1340.      */
  1341.     public function getStartDate()
  1342.     {
  1343.         return $this->startDate;
  1344.     }
  1345.     /**
  1346.      * Set startDate
  1347.      *
  1348.      * @param DateTime $startDate
  1349.      *
  1350.      * @return Event
  1351.      */
  1352.     public function setStartDate($startDate)
  1353.     {
  1354.         $this->startDate $startDate;
  1355.         return $this;
  1356.     }
  1357.     /**
  1358.      * @return DateTime
  1359.      */
  1360.     public function getEndDate()
  1361.     {
  1362.         return $this->endDate;
  1363.     }
  1364.     /**
  1365.      * Set endDate
  1366.      *
  1367.      * @param DateTime $endDate
  1368.      *
  1369.      * @return Event
  1370.      */
  1371.     public function setEndDate($endDate)
  1372.     {
  1373.         $this->endDate $endDate;
  1374.         return $this;
  1375.     }
  1376.     public function getPathDetails()
  1377.     {
  1378.         return 'events_details';
  1379.     }
  1380.     public function getEventCategory()
  1381.     {
  1382.         return $this->getContextMainCategoryId();
  1383.     }
  1384.     public function getContextMainCategoryId(): string
  1385.     {
  1386.         return EventCategoryProvider::getMainCategory($this);
  1387.     }
  1388.     public function getFlyerContextMainCategoryId(): string
  1389.     {
  1390.         return EventCategoryProvider::getFlyerMainCategory($this);
  1391.     }
  1392.     public function getMainCategoryPath()
  1393.     {
  1394.         return "events_" $this->getContextMainCategoryId();
  1395.     }
  1396.     public function getMainCategoryTitle()
  1397.     {
  1398.         return EventCategoryProvider::getMainCategoryTitle($this);
  1399.     }
  1400.     public function getMainCategoryNews()
  1401.     {
  1402.         return "events_" $this->getContextMainCategoryId();
  1403.     }
  1404.     public function getContextCategoryId(): string
  1405.     {
  1406.         return $this->getCategoryUrl();
  1407.     }
  1408.     /**
  1409.      * @return string
  1410.      */
  1411.     public function getCategoryUrl(): ?string
  1412.     {
  1413.         if ($this->category == null || $this->category == '') {
  1414.             return Event::EVENT_NO_CATEGORY;
  1415.         }
  1416.         return Transliterator::transliterate(strtolower($this->category));
  1417.     }
  1418.     public function isSport()
  1419.     {
  1420.         return EventCategoryProvider::CAT_SPORTS == $this->getContextMainCategoryId();
  1421.     }
  1422.     public function isNews()
  1423.     {
  1424.         return EventCategoryProvider::CAT_NEWS == $this->getContextMainCategoryId();
  1425.     }
  1426.     public function isCulture()
  1427.     {
  1428.         return EventCategoryProvider::CAT_CULTURE == $this->getContextMainCategoryId();
  1429.     }
  1430.     public function isSportEvent()
  1431.     {
  1432.         return $this->getEventType() == EventCategoryProvider::NEOS_TYPE_PROG;
  1433.     }
  1434.     /**
  1435.      * @return string
  1436.      */
  1437.     public function getEventType()
  1438.     {
  1439.         return $this->eventType;
  1440.     }
  1441.     /**
  1442.      * @param mixed $eventType
  1443.      */
  1444.     public function setEventType($eventType null)
  1445.     {
  1446.         $this->eventType $eventType;
  1447.     }
  1448.     public function isNewsEvent()
  1449.     {
  1450.         return (in_array($this->getEventType(), EventCategoryProvider::NEOS_TYPE_NEWS_AND_BRKN) || ($this->getEventType() === EventCategoryProvider::NEOS_TYPE_PROG && in_array($this->getCategoryCode(), EventCategoryProvider::NEOS_NEWS_CAT)));
  1451.     }
  1452.     /**
  1453.      * @return string
  1454.      */
  1455.     public function getResponsibleOffice()
  1456.     {
  1457.         return $this->responsibleOffice;
  1458.     }
  1459.     /**
  1460.      * Set responsibleOffice
  1461.      *
  1462.      * @param string $responsibleOffice
  1463.      *
  1464.      * @return Event
  1465.      */
  1466.     public function setResponsibleOffice($responsibleOffice)
  1467.     {
  1468.         $this->responsibleOffice $responsibleOffice;
  1469.         return $this;
  1470.     }
  1471.     /**
  1472.      * @return string
  1473.      */
  1474.     public function getResponsibleCode()
  1475.     {
  1476.         return $this->responsibleCode;
  1477.     }
  1478.     /**
  1479.      * Set responsibleCode
  1480.      *
  1481.      * @param string $responsibleCode
  1482.      *
  1483.      * @return Event
  1484.      */
  1485.     public function setResponsibleCode($responsibleCode)
  1486.     {
  1487.         $this->responsibleCode $responsibleCode;
  1488.         return $this;
  1489.     }
  1490.     /**
  1491.      * @return string
  1492.      */
  1493.     public function getResponsibleDetails()
  1494.     {
  1495.         return $this->responsibleDetails;
  1496.     }
  1497.     /**
  1498.      * Set responsibleDetails
  1499.      *
  1500.      * @param string $responsibleDetails
  1501.      *
  1502.      * @return Event
  1503.      */
  1504.     public function setResponsibleDetails($responsibleDetails)
  1505.     {
  1506.         $this->responsibleDetails $responsibleDetails;
  1507.         return $this;
  1508.     }
  1509.     /**
  1510.      * @return string
  1511.      */
  1512.     public function getContactOnSite()
  1513.     {
  1514.         return $this->contactOnSite;
  1515.     }
  1516.     /**
  1517.      * Set contactOnSite
  1518.      *
  1519.      * @param string $contactOnSite
  1520.      *
  1521.      * @return Event
  1522.      */
  1523.     public function setContactOnSite($contactOnSite)
  1524.     {
  1525.         $this->contactOnSite $contactOnSite;
  1526.         return $this;
  1527.     }
  1528.     /**
  1529.      *
  1530.      * @return string
  1531.      */
  1532.     public function getContactOnSiteDetails()
  1533.     {
  1534.         return $this->contactOnSiteDetails;
  1535.     }
  1536.     /**
  1537.      * Set contactOnSiteDetails
  1538.      *
  1539.      * @param string $contactOnSiteDetails
  1540.      *
  1541.      * @return Event
  1542.      */
  1543.     public function setContactOnSiteDetails($contactOnSiteDetails)
  1544.     {
  1545.         $this->contactOnSiteDetails $contactOnSiteDetails;
  1546.         return $this;
  1547.     }
  1548.     /**
  1549.      * @return boolean
  1550.      */
  1551.     public function getIsPartialTimingAllowed()
  1552.     {
  1553.         return $this->isPartialTimingAllowed;
  1554.     }
  1555.     /**
  1556.      * Set isPartialTimingAllowed
  1557.      *
  1558.      * @param boolean $isPartialTimingAllowed
  1559.      *
  1560.      * @return Event
  1561.      */
  1562.     public function setIsPartialTimingAllowed($isPartialTimingAllowed)
  1563.     {
  1564.         $this->isPartialTimingAllowed $isPartialTimingAllowed;
  1565.         return $this;
  1566.     }
  1567.     /**
  1568.      * @return boolean
  1569.      */
  1570.     public function getIsUniOrderAllowed()
  1571.     {
  1572.         return $this->isUniOrderAllowed;
  1573.     }
  1574.     /**
  1575.      * Set isUniOrderAllowed
  1576.      *
  1577.      * @param boolean $isUniOrderAllowed
  1578.      *
  1579.      * @return Event
  1580.      */
  1581.     public function setIsUniOrderAllowed($isUniOrderAllowed)
  1582.     {
  1583.         $this->isUniOrderAllowed $isUniOrderAllowed;
  1584.         return $this;
  1585.     }
  1586.     /**
  1587.      * @return boolean
  1588.      */
  1589.     public function getRhsBookingAllowed()
  1590.     {
  1591.         return $this->rhsBookingAllowed;
  1592.     }
  1593.     /**
  1594.      * @param boolean $rhsBookingAllowed
  1595.      * @return Event
  1596.      */
  1597.     public function setRhsBookingAllowed($rhsBookingAllowed)
  1598.     {
  1599.         $this->rhsBookingAllowed $rhsBookingAllowed;
  1600.         return $this;
  1601.     }
  1602.     public function __toString(): string
  1603.     {
  1604.         return (string)$this->title;
  1605.     }
  1606.     /**
  1607.      * Get id
  1608.      *
  1609.      * @return int
  1610.      */
  1611.     public function getId()
  1612.     {
  1613.         return $this->id;
  1614.     }
  1615.     /**
  1616.      * Add node
  1617.      *
  1618.      * @param Node $node
  1619.      *
  1620.      * @return Event
  1621.      */
  1622.     public function addNode(Node $node)
  1623.     {
  1624.         $this->nodes[] = $node;
  1625.         return $this;
  1626.     }
  1627.     /**
  1628.      * Add node
  1629.      *
  1630.      * @param WorldFeed $worldFeed
  1631.      *
  1632.      */
  1633.     public function addWorldFeed(WorldFeed $worldFeed)
  1634.     {
  1635.         $this->worldFeeds->add($worldFeed);
  1636.         $worldFeed->event $this;
  1637.     }
  1638.     /**
  1639.      * Remove node
  1640.      *
  1641.      * @param WorldFeed $node
  1642.      */
  1643.     public function removeWorldFeed(WorldFeed $node)
  1644.     {
  1645.         $this->worldFeeds->removeElement($node);
  1646.     }
  1647.     /**
  1648.      * Remove node
  1649.      *
  1650.      * @param Node $node
  1651.      */
  1652.     public function removeNode(Node $node)
  1653.     {
  1654.         $this->nodes->removeElement($node);
  1655.     }
  1656.     /**
  1657.      * Remove article
  1658.      *
  1659.      * @param EventArticle $article
  1660.      */
  1661.     public function removeArticle(EventArticle $article)
  1662.     {
  1663.         $this->articles->removeElement($article);
  1664.     }
  1665.     /**
  1666.      * Get article
  1667.      *
  1668.      * @return Collection
  1669.      */
  1670.     public function getArticles()
  1671.     {
  1672.         return $this->articles;
  1673.     }
  1674.     /**
  1675.      * Set articles
  1676.      *
  1677.      * @param Collection
  1678.      * @return $this
  1679.      */
  1680.     public function setArticles($articles)
  1681.     {
  1682.         if (count($articles ?? []) > 0) {
  1683.             foreach ($articles as $article) {
  1684.                 $this->addArticle($article);
  1685.             }
  1686.         }
  1687.         return $this;
  1688.     }
  1689.     /**
  1690.      * Add article
  1691.      *
  1692.      * @param EventArticle $article
  1693.      *
  1694.      * @return Event
  1695.      */
  1696.     public function addArticle(EventArticle $article)
  1697.     {
  1698.         $article->setEvent($this);
  1699.         $this->articles[] = $article;
  1700.         return $this;
  1701.     }
  1702.     /**
  1703.      * @return bool true if at least one article is visible
  1704.      */
  1705.     public function hasPublishedAndVisibleArticles(): bool
  1706.     {
  1707.         /**
  1708.          * @var EventArticle $article
  1709.          */
  1710.         foreach ($this->articles as $article) {
  1711.             if ($article->isPublishedAndVisible()) {
  1712.                 return true;
  1713.             }
  1714.         }
  1715.         return false;
  1716.     }
  1717.     /**
  1718.      * Add quickLink
  1719.      *
  1720.      * @param QuickLink $quickLink
  1721.      *
  1722.      * @return Event
  1723.      */
  1724.     public function addQuickLink(QuickLink $quickLink)
  1725.     {
  1726.         $quickLink->setEvent($this);
  1727.         $this->quickLinks[] = $quickLink;
  1728.         return $this;
  1729.     }
  1730.     /**
  1731.      * Remove quickLink
  1732.      *
  1733.      * @param QuickLink $quickLink
  1734.      */
  1735.     public function removeQuickLink(QuickLink $quickLink)
  1736.     {
  1737.         $this->quickLinks->removeElement($quickLink);
  1738.     }
  1739.     /**
  1740.      * Get quickLinks
  1741.      *
  1742.      * @return Collection
  1743.      */
  1744.     public function getQuickLinks()
  1745.     {
  1746.         return $this->quickLinks;
  1747.     }
  1748.     /**
  1749.      * @return mixed
  1750.      */
  1751.     public function getCityName()
  1752.     {
  1753.         return $this->cityName;
  1754.     }
  1755.     /**
  1756.      * Set cityName
  1757.      *
  1758.      * @param string $cityName
  1759.      *
  1760.      * @return Event
  1761.      */
  1762.     public function setCityName($cityName)
  1763.     {
  1764.         $this->cityName $cityName;
  1765.         return $this;
  1766.     }
  1767.     /**
  1768.      * @return mixed
  1769.      */
  1770.     public function getCountryName()
  1771.     {
  1772.         return $this->countryName;
  1773.     }
  1774.     /**
  1775.      * Set countryName
  1776.      *
  1777.      * @param string $countryName
  1778.      *
  1779.      * @return Event
  1780.      */
  1781.     public function setCountryName($countryName)
  1782.     {
  1783.         $this->countryName $countryName;
  1784.         return $this;
  1785.     }
  1786.     /**
  1787.      *
  1788.      * @return string
  1789.      */
  1790.     public function getDescription()
  1791.     {
  1792.         return $this->description;
  1793.     }
  1794.     /**
  1795.      * @param string $description
  1796.      *
  1797.      * @return Event
  1798.      */
  1799.     public function setDescription($description)
  1800.     {
  1801.         $this->description $description;
  1802.         return $this;
  1803.     }
  1804.     /**
  1805.      *
  1806.      * @return string
  1807.      */
  1808.     public function getLongDescription()
  1809.     {
  1810.         return $this->longDescription;
  1811.     }
  1812.     /**
  1813.      * @param string $longDescription
  1814.      *
  1815.      * @return Event
  1816.      */
  1817.     public function setLongDescription($longDescription)
  1818.     {
  1819.         $this->longDescription $longDescription;
  1820.         return $this;
  1821.     }
  1822.     /**
  1823.      * @return string
  1824.      */
  1825.     public function getRateCard()
  1826.     {
  1827.         return $this->rateCard;
  1828.     }
  1829.     /**
  1830.      * @param string $rateCard
  1831.      *
  1832.      * @return Event
  1833.      */
  1834.     public function setRateCard($rateCard)
  1835.     {
  1836.         $this->rateCard $rateCard;
  1837.         return $this;
  1838.     }
  1839.     /**
  1840.      * @return Gallery
  1841.      */
  1842.     public function getGallery()
  1843.     {
  1844.         return $this->gallery;
  1845.     }
  1846.     /**
  1847.      * @param Gallery $gallery
  1848.      *
  1849.      * @return Event
  1850.      */
  1851.     public function setGallery(Gallery $gallery null)
  1852.     {
  1853.         $this->gallery $gallery;
  1854.         return $this;
  1855.     }
  1856.     /**
  1857.      * Get website
  1858.      *
  1859.      * @return string
  1860.      */
  1861.     public function getWebsite()
  1862.     {
  1863.         return $this->website;
  1864.     }
  1865.     /**
  1866.      * Set website
  1867.      *
  1868.      * @param string $website
  1869.      *
  1870.      * @return Event
  1871.      */
  1872.     public function setWebsite($website)
  1873.     {
  1874.         $this->website $website;
  1875.         return $this;
  1876.     }
  1877.     /**
  1878.      * @return bool
  1879.      */
  1880.     public function isShowUnisInTransmissions(): bool
  1881.     {
  1882.         return $this->showUnisInTransmissions === null false $this->showUnisInTransmissions;
  1883.     }
  1884.     /**
  1885.      * @return string
  1886.      */
  1887.     public function getShowUnisInTransmissions(): ?bool
  1888.     {
  1889.         return $this->showUnisInTransmissions;
  1890.     }
  1891.     /**
  1892.      * @param bool $showUnisInTransmissions
  1893.      */
  1894.     public function setShowUnisInTransmissions(bool $showUnisInTransmissions): void
  1895.     {
  1896.         $this->showUnisInTransmissions $showUnisInTransmissions;
  1897.     }
  1898.     /**
  1899.      * @return bool
  1900.      */
  1901.     public function isNeosValidConfiguration(): bool
  1902.     {
  1903.         return $this->neosValidConfiguration === null false $this->neosValidConfiguration;
  1904.     }
  1905.     /**
  1906.      * @return bool
  1907.      */
  1908.     public function getNeosValidConfiguration(): ?bool
  1909.     {
  1910.         return $this->neosValidConfiguration;
  1911.     }
  1912.     /**
  1913.      * @param bool $neosValidConfiguration
  1914.      */
  1915.     public function setNeosValidConfiguration(bool $neosValidConfiguration): void
  1916.     {
  1917.         $this->neosValidConfiguration $neosValidConfiguration;
  1918.     }
  1919.     /**
  1920.      * @return bool
  1921.      */
  1922.     public function isRhsBookingAllowed(): bool
  1923.     {
  1924.         return $this->rhsBookingAllowed === null false $this->rhsBookingAllowed;
  1925.     }
  1926.     /**
  1927.      * @return string
  1928.      */
  1929.     public function getNeosConfigurationNote()
  1930.     {
  1931.         return $this->neosConfigurationNote;
  1932.     }
  1933.     /**
  1934.      * @param string $neosConfigurationNote
  1935.      * @return Event
  1936.      */
  1937.     public function setNeosConfigurationNote($neosConfigurationNote)
  1938.     {
  1939.         $this->neosConfigurationNote $neosConfigurationNote;
  1940.         return $this;
  1941.     }
  1942.     /**
  1943.      * @return bool
  1944.      */
  1945.     public function getShowBookingContact(): ?bool
  1946.     {
  1947.         return $this->showBookingContact;
  1948.     }
  1949.     /**
  1950.      * @return bool
  1951.      */
  1952.     public function isShowBookingContact(): bool
  1953.     {
  1954.         return $this->showBookingContact === null false $this->showBookingContact;
  1955.     }
  1956.     /**
  1957.      * @param bool $showBookingContact
  1958.      */
  1959.     public function setShowBookingContact(bool $showBookingContact): void
  1960.     {
  1961.         $this->showBookingContact $showBookingContact;
  1962.     }
  1963.     /**
  1964.      * @return bool
  1965.      */
  1966.     public function getShowPastTransmissions(): ?bool
  1967.     {
  1968.         return $this->showPastTransmissions;
  1969.     }
  1970.     /**
  1971.      * @return bool
  1972.      */
  1973.     public function isShowPastTransmissions(): bool
  1974.     {
  1975.         return $this->showPastTransmissions === null false $this->showPastTransmissions;
  1976.     }
  1977.     /**
  1978.      * @param bool $showPastTransmissions
  1979.      */
  1980.     public function setShowPastTransmissions(bool $showPastTransmissions): void
  1981.     {
  1982.         $this->showPastTransmissions $showPastTransmissions;
  1983.     }
  1984.     /**
  1985.      * @return bool
  1986.      */
  1987.     public function getShowNewsOperationContact(): ?bool
  1988.     {
  1989.         return $this->showNewsOperationContact;
  1990.     }
  1991.     /**
  1992.      * @return bool
  1993.      */
  1994.     public function isShowNewsOperationContact(): bool
  1995.     {
  1996.         return $this->showNewsOperationContact === null false $this->showNewsOperationContact;
  1997.     }
  1998.     /**
  1999.      * @param bool $showNewsOperationContact
  2000.      */
  2001.     public function setShowNewsOperationContact(bool $showNewsOperationContact): void
  2002.     {
  2003.         $this->showNewsOperationContact $showNewsOperationContact;
  2004.     }
  2005.     /**
  2006.      * @return string
  2007.      */
  2008.     public function getRateCardMember()
  2009.     {
  2010.         return $this->rateCardMember;
  2011.     }
  2012.     /**
  2013.      * @param string $rateCardMember
  2014.      *
  2015.      * @return Event
  2016.      */
  2017.     public function setRateCardMember($rateCardMember)
  2018.     {
  2019.         $this->rateCardMember $rateCardMember;
  2020.         return $this;
  2021.     }
  2022.     /**
  2023.      *
  2024.      * @return string
  2025.      */
  2026.     public function getWorldfeedDescription()
  2027.     {
  2028.         return $this->worldfeedDescription;
  2029.     }
  2030.     /**
  2031.      * @param string $worldfeedDescription
  2032.      *
  2033.      * @return Event
  2034.      */
  2035.     public function setWorldfeedDescription($worldfeedDescription)
  2036.     {
  2037.         $this->worldfeedDescription $worldfeedDescription;
  2038.         return $this;
  2039.     }
  2040.     /**
  2041.      * Add related event
  2042.      *
  2043.      * @param Event $event
  2044.      * @return Insight
  2045.      */
  2046.     public function addRelatedEvent(Event $event)
  2047.     {
  2048.         if (count($this->relatedEvents ?? []) < && $this->id !== $event->getId()) {
  2049.             $this->relatedEvents[] = $event;
  2050.         }
  2051.         return $this;
  2052.     }
  2053.     /**
  2054.      * Get related events
  2055.      *
  2056.      * @return Collection
  2057.      */
  2058.     public function getRelatedEvents()
  2059.     {
  2060.         return $this->relatedEvents;
  2061.     }
  2062.     /**
  2063.      * @param mixed $relatedEvents
  2064.      */
  2065.     public function setRelatedEvents($relatedEvents): void
  2066.     {
  2067.         $count count($relatedEvents ?? []);
  2068.         $this->relatedEvents = new ArrayCollection();
  2069.         if ($count 0) {
  2070.             for ($i 0$i min(3$count); $i++) {
  2071.                 $this->addRelatedEvent($relatedEvents[$i]);
  2072.             }
  2073.         }
  2074.     }
  2075.     public function hasRelatedEvents()
  2076.     {
  2077.         $eventsShowable = [];
  2078.         $today = new DateTime("now");
  2079.         if (count($this->relatedEvents ?? []) > 0) {
  2080.             foreach ($this->relatedEvents as $event) {
  2081.                 if ($event->visibleFrontend) {
  2082.                     if ($event->endDate $today) {
  2083.                         $eventsShowable[] = $event;
  2084.                     }
  2085.                 }
  2086.             }
  2087.         }
  2088.         return $eventsShowable;
  2089.     }
  2090. }