Sabre\VObject\ITip\Broker::processMessageCancel PHP Method

processMessageCancel() protected method

This is a message from an organizer, and means that either an attendee got removed from an event, or an event got cancelled altogether.
protected processMessageCancel ( Sabre\VObject\ITip\Message $itipMessage, Sabre\VObject\Component\VCalendar $existingObject = null ) : Sabre\VObject\Component\VCalendar | null
$itipMessage Sabre\VObject\ITip\Message
$existingObject Sabre\VObject\Component\VCalendar
return Sabre\VObject\Component\VCalendar | null
    protected function processMessageCancel(Message $itipMessage, VCalendar $existingObject = null)
    {
        if (!$existingObject) {
            // The event didn't exist in the first place, so we're just
            // ignoring this message.
        } else {
            foreach ($existingObject->VEVENT as $vevent) {
                $vevent->STATUS = 'CANCELLED';
                $vevent->SEQUENCE = $itipMessage->sequence;
            }
        }
        return $existingObject;
    }