Adds an event to a calendar

@param Event $event Event object
@return boolean
193663
public function addEvent($event) {
		$result = add_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid);

		if ($result) {
			// allow events to fire after confirmation that it has been added to the calendar
			elgg_trigger_event('events_api', 'add_to_calendar', array('event' => $event, 'calendar' => $this));
		}
		return $result;
	}
141540
private function add($event, $class, $method = null)
    {
        $this->events[$event][] = [
            'class'  => $class,
            'method' => $method ?: $event,
        ];

        return $this;
    }
262795
public static function start(CalendarEvent $event)
    {
        $reservation = Reservation::create();
        $reservation->EventID = $event->ID;
        $reservation->write();
        self::set($reservation);
        return $reservation;
    }
688539
public function addEvent(EventEntity $event)
    {
        if (!$this->events->contains($event)) {
            $this->events[] = $event;
        }
        
        return $this;
    }
963310
public function setEvent(\Claroline\AgendaBundle\Entity\Event $event)
    {
        $this->event = $event;

        return $this;
    }
1309332
public function addEvent(Event $event)
    {
        $expectedSequenceNumber = $this->nextSequenceNumber();
        if ($expectedSequenceNumber !== $event->sequenceNumber()) {
            throw new \RuntimeException('Corrupted sequence number.');
        }

        $this->events[] = $this->applyRegistrationCallbacks($event);
    }
602046
public function attach($event)
    {
        $this->attachRows($event);
        $this->attachSeo($event);
        $this->attachAnonsModule($event);
    }
142916
public function addTimeEvent(TimeEvent $event)
    {
        if (!$this->timeEvents) {
            $this->timeEvents = [];
        }
        $this->timeEvents[] = $event;
    }
189215
public function addIcalendarEvent(\sb\ICalendar\Event $event)
    {

        $a = new \sb\Email\Attachment();
        $a->mime_type = 'text/calendar;';
        $a->setEncoding('8bit');
        $a->name = 'event.ics';
        $a->contents = $event->__toString();

        $this->addAttachment($a);
    }
132665
private function isEventSupported(Event $event): bool
    {
        $supported = false;

        foreach ($this->getSupportedEventTypes() as $supportedEventType) {
            if (\is_a($event, $supportedEventType)) {
                $supported = true;

                break;
            }
        }

        return $supported;
    }
806351
public function buildFromEvent(Event $event)
    {
        $this->setEvent($event);

        $configs = $this->getConfigFilesByComposer();
        $this->addFindersByConfigs($configs);

        // We have to initialize composer autoload
        require_once 'vendor/autoload.php';

        $this->build();
    }
68175
protected function _write($event)
    {
        $data = array();
        if (empty($this->getColumnMap())) {
            $data = $event;
        } else {
            foreach ($this->getColumnMap() as $name => $value) {
                if (isset($event[$name])) {
                    $data[$name] = $event[$name];
                }
            }
        }

        $entry = new $this->modelClass();
        $entry->fromArray($data);
        $entry->save();

        return $this;
    }
88294
public function publish(Event $event)
    {
        foreach ($this->subscribers as $subscriber) {
            if ($subscriber->isSubscribedTo($event)) {
                $subscriber->handle($event);
            }
        }

        return $this;
    }
280805
public function create(Event $event)
    {
        return $this->cache->store($this->store)->add(
            $event->mutexName(), true, $event->expiresAt * 60
        );
    }
569677
public function addEvent(EventMessage $event)
    {
        $this->events[] = $event;
        if (stristr($event->getEventList(), 'complete') !== false
            || stristr($event->getName(), 'complete') !== false
            || stristr($event->getName(), 'DBGetResponse') !== false
        ) {
            $this->completed = true;
        }
    }
973399
public boolean add(XEvent event) {
		try {
			events.append(event);
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}
		return true;
	}
689198
public function addEvents(array $events = array())
    {
        $events['projectId'] = $this->getConfig('projectId');
        $events['writeKey'] = $this->getKeyForWriting();

        $command = parent::getCommand('addEvents', $events);

        return $this->execute($command);
    }