public function addEvent(Event $event): self
    {
        $event->setSchedule($this);
        $this->events[] = $event;

        return $this;
    }
public function addEvent(Event $event): self
    {
        $event->setSchedule($this);
        $this->events[] = $event;

        return $this;
    }
public function addEvent ( Event $ event ) : self { $ event -> setSchedule ( $ this ) ; $ this -> events [ ] = $ event ; return $ this ; }
Add event.

@param Event $event The event to add.

@return self
Add event .