ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ILIAS\EmployeeTalk\Notification\Calendar\VEvent Class Reference
+ Collaboration diagram for ILIAS\EmployeeTalk\Notification\Calendar\VEvent:

Public Member Functions

 __construct (string $uid, string $description, string $summary, int $sequence, EventStatus $status, string $organiserName, string $organiserEmail, string $attendeeName, string $attendeeEmail, int $startTime, int $endTime, bool $allDay, string $url, string $location)
 
 render ()
 

Protected Member Functions

 renderStartAndEndDates ()
 

Protected Attributes

string $uid
 
string $description
 
string $summary
 
int $sequence
 
EventStatus $status
 
string $organiser_name
 
string $organiser_email
 
string $attendee_name
 
string $attendee_email
 
int $start_time
 
int $end_time
 
bool $all_day
 
string $url
 
string $location
 

Detailed Description

Definition at line 23 of file VEvent.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\EmployeeTalk\Notification\Calendar\VEvent::__construct ( string  $uid,
string  $description,
string  $summary,
int  $sequence,
EventStatus  $status,
string  $organiserName,
string  $organiserEmail,
string  $attendeeName,
string  $attendeeEmail,
int  $startTime,
int  $endTime,
bool  $allDay,
string  $url,
string  $location 
)

Definition at line 40 of file VEvent.php.

References ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$description, ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$location, ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$sequence, ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$status, ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$summary, ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$uid, and ILIAS\EmployeeTalk\Notification\Calendar\VEvent\$url.

55  {
56  $this->uid = $uid;
57  $this->description = $description;
58  $this->summary = $summary;
59  $this->sequence = $sequence;
60  $this->status = $status;
61  $this->organiser_name = $organiserName;
62  $this->organiser_email = $organiserEmail;
63  $this->attendee_name = $attendeeName;
64  $this->attendee_email = $attendeeEmail;
65  $this->start_time = $startTime;
66  $this->end_time = $endTime;
67  $this->all_day = $allDay;
68  $this->url = $url;
69  $this->location = $location;
70  }

Member Function Documentation

◆ render()

ILIAS\EmployeeTalk\Notification\Calendar\VEvent::render ( )

Definition at line 90 of file VEvent.php.

References ILIAS\EmployeeTalk\Notification\Calendar\VEvent\renderStartAndEndDates().

90  : string
91  {
92  return 'BEGIN:VEVENT' . "\r\n" .
93  'UID: ' . $this->uid . "\r\n" .
94  'DESCRIPTION:' . $this->description . "\r\n" .
95  $this->renderStartAndEndDates() .
96  'DTSTAMP:' . date("Ymd\THis") . "\r\n" .
97  'LAST-MODIFIED:' . date("Ymd\THis") . "\r\n" .
98  'ORGANIZER;CN="' . $this->organiser_name . '":MAILTO:' . $this->organiser_email . "\r\n" .
99  'ATTENDEE;CN="' . $this->attendee_name . '";ROLE=REQ-PARTICIPANT;RSVP=TRUE:MAILTO:' . $this->attendee_email . "\r\n" .
100  'SUMMARY:' . $this->summary . "\r\n" .
101  'LOCATION:' . $this->location . "\r\n" .
102  'SEQUENCE:' . $this->sequence . "\r\n" .
103  "PRIORITY:5\r\n" .
104  'STATUS:' . $this->status->value . "\r\n" .
105  "TRANSP:OPAQUE\r\n" .
106  "X-MICROSOFT-CDO-BUSYSTATUS:BUSY\r\n" .
107  'CLASS:PUBLIC' . "\r\n" .
108  "X-MICROSOFT-DISALLOW-COUNTER:TRUE\r\n" .
109  //'URL:'. $this->url . "\r\n" .
110 
111  'BEGIN:VALARM' . "\r\n" .
112  'DESCRIPTION:' . $this->summary . "\r\n" .
113  'TRIGGER:-PT15M' . "\r\n" .
114  'ACTION:DISPLAY' . "\r\n" .
115  'END:VALARM' . "\r\n" .
116 
117  'END:VEVENT' . "\r\n";
118  }
+ Here is the call graph for this function:

◆ renderStartAndEndDates()

ILIAS\EmployeeTalk\Notification\Calendar\VEvent::renderStartAndEndDates ( )
protected

Definition at line 72 of file VEvent.php.

Referenced by ILIAS\EmployeeTalk\Notification\Calendar\VEvent\render().

72  : string
73  {
74  // creating DateTimes from Unix timestamps automatically sets the initial timezone to UTC
75  $start = new \DateTimeImmutable('@' . $this->start_time);
76  $start = $start->setTimezone(new \DateTimeZone('Europe/Paris'));
77  $end = new \DateTimeImmutable('@' . $this->end_time);
78  $end = $end->setTimezone(new \DateTimeZone('Europe/Paris'));
79 
80  if ($this->all_day) {
81  return 'DTSTART;TZID=Europe/Paris;VALUE=DATE:' . $start->format('Ymd') . "\r\n" .
82  'DTEND;TZID=Europe/Paris;VALUE=DATE:' . $end->format('Ymd') . "\r\n" .
83  "X-MICROSOFT-CDO-ALLDAYEVENT: TRUE\r\n";
84  } else {
85  return 'DTSTART;TZID=Europe/Paris:' . $start->format('Ymd\THis') . "\r\n" .
86  'DTEND;TZID=Europe/Paris:' . $end->format('Ymd\THis') . "\r\n";
87  }
88  }
+ Here is the caller graph for this function:

Field Documentation

◆ $all_day

bool ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$all_day
protected

Definition at line 36 of file VEvent.php.

◆ $attendee_email

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$attendee_email
protected

Definition at line 33 of file VEvent.php.

◆ $attendee_name

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$attendee_name
protected

Definition at line 32 of file VEvent.php.

◆ $description

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$description
protected

◆ $end_time

int ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$end_time
protected

Definition at line 35 of file VEvent.php.

◆ $location

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$location
protected

◆ $organiser_email

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$organiser_email
protected

Definition at line 31 of file VEvent.php.

◆ $organiser_name

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$organiser_name
protected

Definition at line 30 of file VEvent.php.

◆ $sequence

int ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$sequence
protected

◆ $start_time

int ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$start_time
protected

Definition at line 34 of file VEvent.php.

◆ $status

EventStatus ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$status
protected

◆ $summary

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$summary
protected

◆ $uid

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$uid
protected

◆ $url

string ILIAS\EmployeeTalk\Notification\Calendar\VEvent::$url
protected

The documentation for this class was generated from the following file: