Event/CalendarEvent.php
public function addEvent(EventEntity $event)
    {
        if (!$this->events->contains($event)) {
            $this->events[] = $event;
        }
        
        return $this;
    }
public function addEvent(EventEntity $event)
    {
        if (!$this->events->contains($event)) {
            $this->events[] = $event;
        }
        
        return $this;
    }
public function addEvent ( EventEntity $ event ) { if ( ! $ this -> events -> contains ( $ event ) ) { $ this -> events [ ] = $ event ; } return $ this ; }
If the event isn't already in the list, add it

@param EventEntity $event
@return CalendarEvent $this
If the event isn t already in the list add it