1<?php 2include_once './Services/Calendar/interfaces/interface.ilCalendarAppointmentPresentation.php'; 3include_once './Services/Calendar/classes/AppointmentPresentation/class.ilAppointmentPresentationGUI.php'; 4 5/** 6 * ilAppointmentPresentationPublicGUI class presents modal information for public appointments. 7 * 8 * @author Jesús López Reyes <lopez@leifos.com> 9 * @version $Id$ 10 * 11 * @ilCtrl_IsCalledBy ilAppointmentPresentationPublicGUI: ilCalendarAppointmentPresentationGUI 12 * 13 * @ingroup ServicesCalendar 14 */ 15class ilAppointmentPresentationPublicGUI extends ilAppointmentPresentationGUI implements ilCalendarAppointmentPresentation 16{ 17 protected $seed; 18 19 /** 20 * Get seed date 21 */ 22 public function getSeed() 23 { 24 return $this->seed; 25 } 26 27 public function collectPropertiesAndActions() 28 { 29 global $DIC; 30 31 $a_app = $this->appointment; 32 33 $cat_info = $this->getCatInfo(); 34 35 // event title 36 $this->addInfoSection($a_app["event"]->getPresentationTitle()); 37 38 // event description 39 $this->addEventDescription($a_app); 40 41 // calendar info 42 if ($cat_info != null) { 43 $this->addCalendarInfo($cat_info); 44 } 45 46 47 $this->addInfoSection($this->lng->txt("cal_app_info")); 48 49 // event location 50 $this->addEventLocation($a_app); 51 52 //user notifications 53 include_once './Services/Calendar/classes/class.ilCalendarUserNotification.php'; 54 55 $notification = new ilCalendarUserNotification($a_app['event']->getEntryId()); 56 57 $recipients = $notification->getRecipients(); 58 if (count($recipients) > 0) { 59 $str_notification = ""; 60 foreach ($recipients as $rcp) { 61 switch ($rcp['type']) { 62 case ilCalendarUserNotification::TYPE_USER: 63 $str_notification .= $this->getUserName($rcp['usr_id']) . "<br>"; 64 break; 65 case ilCalendarUserNotification::TYPE_EMAIL: 66 $str_notification .= $rcp['email'] . "<br>"; 67 break; 68 } 69 } 70 $this->addInfoProperty($this->lng->txt("cal_user_notification"), $str_notification); 71 } 72 } 73} 74