ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAppointmentPresentationGroupGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationGroupGUI:
+ Collaboration diagram for ilAppointmentPresentationGroupGUI:

Public Member Functions

 collectPropertiesAndActions ()
 Collect properties and actions. More...
 
- Public Member Functions inherited from ilAppointmentPresentationGUI
 __construct ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
 getObjIdForAppointment ()
 
 getToolbar ()
 
 getListItem ()
 Get list item. More...
 
 getInfoScreen ()
 
 getCatId ($a_entry_id)
 
 getCatInfo ()
 
 executeCommand ()
 
 getHTML ()
 Get HTML. More...
 
 addContainerInfo ($a_obj_id)
 Add course/group container info. More...
 
 addInfoSection ($a_txt)
 Add info section. More...
 
 addInfoProperty ($a_txt, $a_val)
 Add info property. More...
 
 addListItemProperty ($a_txt, $a_val)
 Add list item property. More...
 
 addAction ($a_txt, $a_link)
 Add action. More...
 
 collectPropertiesAndActions ()
 Collect properties and actions. More...
 
 collectStandardPropertiesAndActions ()
 Collect standard properties and actions. More...
 
 addObjectLinks ($obj_id, $a_appointment=null)
 Add object link. More...
 
 getReadableRefIds ($a_obj_id)
 Get readable ref ids. More...
 
 addEventDescription ($a_app)
 Add event description. More...
 
 addEventLocation ($a_app)
 Add event location. More...
 
 addLastUpdate ($a_app)
 Add last update. More...
 
 addCalendarInfo ($cat_info)
 Add calendar info. More...
 
 addCommonSection ($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
 Add common section. More...
 
 addMetaData ($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
 Add metadata. More...
 
 getUserName ($a_user_id, $a_force_name=false)
 Get (linked if possible) user name. More...
 
 downloadFiles ()
 Download files from an appointment ( Modals ) More...
 
 getToolbar ()
 
 getInfoScreen ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAppointmentPresentationGUI
static getInstance ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
- Protected Member Functions inherited from ilAppointmentPresentationGUI
 readObjIdForAppointment ()
 read obj_id for appointment More...
 
 buildDirectLinkForAppointment ($a_ref_id, $a_appointment=null)
 Build direct link for appointment. More...
 
- Protected Attributes inherited from ilAppointmentPresentationGUI
 $toolbar
 
 $appointment
 
 $infoscreen
 
 $lng
 
 $tree
 
 $ui
 
 $list_item = null
 
 $info_items = array()
 
 $list_properties = array()
 
 $actions = array()
 
 $ctrl
 
 $access
 
 $readable_ref_ids
 
 $has_files = false
 
 $obj_id = 0
 
- Static Protected Attributes inherited from ilAppointmentPresentationGUI
static $instance
 

Detailed Description

Member Function Documentation

◆ collectPropertiesAndActions()

ilAppointmentPresentationGroupGUI::collectPropertiesAndActions ( )

Collect properties and actions.

Reimplemented from ilAppointmentPresentationGUI.

Definition at line 16 of file class.ilAppointmentPresentationGroupGUI.php.

17 {
18 global $DIC;
19
20 include_once "./Modules/Group/classes/class.ilObjGroup.php";
21
23 $user = $DIC->user();
24
25 $app = $this->appointment;
26
27 $this->lng->loadLanguageModule("grp");
28
29 $cat_info = $this->getCatInfo();
30
31 $grp = new ilObjGroup($cat_info['obj_id'], false);
32
33 $refs = ilObject::_getAllReferences($cat_info['obj_id']);
34 $grp_ref_id = current($refs);
35
36 // add common section (title, description, object/calendar, location)
37 $this->addCommonSection($app, $cat_info['obj_id']);
38
39 if ($app['event']->isAutogenerated() && $grp->getInformation()) {
40 $this->addInfoSection($this->lng->txt("cal_grp_info"));
41 $this->addInfoProperty($this->lng->txt("grp_information"), ilUtil::makeClickable(nl2br($grp->getInformation())));
42 }
43
44 // last edited
45 $this->addLastUpdate($app);
46
47 $this->addAction($this->lng->txt("grp_grp_open"), ilLink::_getStaticLink($grp_ref_id, "grp"));
48
49 // register/unregister to appointment
50 if ($settings->isCGRegistrationEnabled()) {
51 if (!$app['event']->isAutoGenerated()) {
52 include_once './Services/Calendar/classes/class.ilCalendarRegistration.php';
53 $reg = new ilCalendarRegistration($app['event']->getEntryId());
54
55 if ($reg->isRegistered($user->getId(), new ilDateTime($app['dstart'], IL_CAL_UNIX), new ilDateTime($app['dend'], IL_CAL_UNIX))) {
56 //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
57 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
58 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
59 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
60
61 $this->addAction($this->lng->txt('cal_reg_unregister'), $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmUnregister'));
62 } else {
63 //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
64 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
65 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
66 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
67
68 $this->addAction($this->lng->txt('cal_reg_register'), $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmRegister'));
69 }
70 $registered = $reg->getRegisteredUsers(
71 new \ilDateTime($app['dstart'], IL_CAL_UNIX),
72 new \ilDateTime($app['dend'], IL_CAL_UNIX)
73 );
74
75 $users = "";
76 foreach ($registered as $user) {
77 $users .= $this->getUserName($user) . '<br />';
78 }
79 if ($users != "") {
80 $this->addInfoProperty($this->lng->txt("cal_reg_registered_users"), $users);
81 }
82 }
83 }
84 }
$users
Definition: authpage.php:44
const IL_CAL_UNIX
getUserName($a_user_id, $a_force_name=false)
Get (linked if possible) user name.
addCommonSection($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
Add common section.
addInfoProperty($a_txt, $a_val)
Add info property.
registration for calendar appointments
static _getInstance()
get singleton instance
@classDescription Date and time handling
Class ilObjGroup.
static _getAllReferences($a_id)
get all reference ids of object
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
$user
Definition: migrateto20.php:57
global $DIC
Definition: saml.php:7

References ilAppointmentPresentationGUI\$appointment, $DIC, $user, $users, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilLink\_getStaticLink(), ilAppointmentPresentationGUI\addAction(), ilAppointmentPresentationGUI\addCommonSection(), ilAppointmentPresentationGUI\addInfoProperty(), ilAppointmentPresentationGUI\addInfoSection(), ilAppointmentPresentationGUI\addLastUpdate(), ilAppointmentPresentationGUI\getCatInfo(), ilAppointmentPresentationGUI\getUserName(), IL_CAL_UNIX, and ilUtil\makeClickable().

+ Here is the call graph for this function:

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