ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAppointmentPresentationGroupGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationGroupGUI:
+ Collaboration diagram for ilAppointmentPresentationGroupGUI:

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from ilAppointmentPresentationGUI
static getInstance (array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
- Protected Member Functions inherited from ilAppointmentPresentationGUI
 readObjIdForAppointment ()
 read obj_id for appointment More...
 
 buildDirectLinkForAppointment (int $a_ref_id, ?array $a_appointment=null)
 Build direct link for appointment. More...
 
- Protected Attributes inherited from ilAppointmentPresentationGUI
array $appointment
 
ilToolbarGUI $toolbar
 
ilInfoScreenGUI $infoscreen
 
ilLanguage $lng
 
ilTree $tree
 
UIServices $ui
 
ilCtrlInterface $ctrl
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
RefineryFactory $refinery
 
HttpServices $http
 
Item $list_item = null
 
array $info_items = []
 
array $list_properties = []
 
array $actions = []
 
array $readable_ref_ids
 
bool $has_files = false
 
int $obj_id = 0
 
- Static Protected Attributes inherited from ilAppointmentPresentationGUI
static self $instance
 

Detailed Description

Member Function Documentation

◆ collectPropertiesAndActions()

ilAppointmentPresentationGroupGUI::collectPropertiesAndActions ( )

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

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

29  : void
30  {
32  $app = $this->appointment;
33 
34  $this->lng->loadLanguageModule("grp");
35 
36  $cat_info = $this->getCatInfo();
37  $grp = new ilObjGroup($cat_info['obj_id'], false);
38 
39  $refs = ilObject::_getAllReferences($cat_info['obj_id']);
40  $grp_ref_id = current($refs);
41 
42  // add common section (title, description, object/calendar, location)
43  $this->addCommonSection($app, $cat_info['obj_id']);
44 
45  if ($app['event']->isAutogenerated() && $grp->getInformation()) {
46  $this->addInfoSection($this->lng->txt("cal_grp_info"));
47  $this->addInfoProperty(
48  $this->lng->txt("grp_information"),
49  ilUtil::makeClickable(nl2br($grp->getInformation()))
50  );
51  }
52 
53  // last edited
54  $this->addLastUpdate($app);
55 
56  $this->addAction($this->lng->txt("grp_grp_open"), ilLink::_getStaticLink($grp_ref_id, "grp"));
57 
58  // register/unregister to appointment
59  if ($settings->isCGRegistrationEnabled()) {
60  if (!$app['event']->isAutoGenerated()) {
61  $reg = new ilCalendarRegistration($app['event']->getEntryId());
62 
63  if ($reg->isRegistered(
64  $this->user->getId(),
65  new ilDateTime($app['dstart'], IL_CAL_UNIX),
66  new ilDateTime($app['dend'], IL_CAL_UNIX)
67  )) {
68  //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
69  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
70  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
71  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
72 
73  $this->addAction(
74  $this->lng->txt('cal_reg_unregister'),
75  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmUnregister')
76  );
77  } else {
78  //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
79  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
80  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
81  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
82 
83  $this->addAction(
84  $this->lng->txt('cal_reg_register'),
85  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmRegister')
86  );
87  }
88  $registered = $reg->getRegisteredUsers(
89  new \ilDateTime($app['dstart'], IL_CAL_UNIX),
90  new \ilDateTime($app['dend'], IL_CAL_UNIX)
91  );
92 
93  $users = "";
94  foreach ($registered as $user) {
95  $users .= $this->getUserName($user) . '<br />';
96  }
97  if ($users != "") {
98  $this->addInfoProperty($this->lng->txt("cal_reg_registered_users"), $users);
99  }
100  }
101  }
102  }
static _getAllReferences(int $id)
get all reference ids for object ID
const IL_CAL_UNIX
addInfoSection(string $a_txt)
Add info section.
addInfoProperty(string $a_txt, string $a_val)
Add info property.
addLastUpdate(array $a_app)
Add last update.
registration for calendar appointments
getUserName(int $a_user_id, bool $a_force_name=false)
Get (linked if possible) user name.
addCommonSection(array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
addAction(string $a_txt, string $a_link)
Add action.
Class ilObjGroup.
static makeClickable(string $a_text, bool $detectGotoLinks=false)
+ Here is the call graph for this function:

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