ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAppointmentPresentationGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationGUI:
+ Collaboration diagram for ilAppointmentPresentationGUI:

Public Member Functions

 __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)
 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...
 

Static Public Member Functions

static getInstance ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 

Protected Member Functions

 readObjIdForAppointment ()
 read obj_id for appointment More...
 

Protected Attributes

 $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

static $instance
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAppointmentPresentationGUI::__construct (   $a_appointment,
  $a_info_screen,
  $a_toolbar,
  $a_list_item 
)
Parameters

Definition at line 98 of file class.ilAppointmentPresentationGUI.php.

References $DIC, readObjIdForAppointment(), and user().

99  {
100  global $DIC;
101  $this->appointment = $a_appointment;
102  $this->infoscreen = $a_info_screen;
103  $this->toolbar = $a_toolbar;
104  $this->lng = $DIC->language();
105  $this->lng->loadLanguageModule("dateplaner");
106  $this->tree = $DIC->repositoryTree();
107  $this->ui = $DIC->ui();
108  $this->list_item = $a_list_item;
109  $this->ctrl = $DIC->ctrl();
110  $this->access = $DIC->access();
111  $this->rbacsystem = $DIC->rbac()->system();
112  $this->user = $DIC->user();
113 
114  $this->readObjIdForAppointment();
115  }
readObjIdForAppointment()
read obj_id for appointment
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
+ Here is the call graph for this function:

Member Function Documentation

◆ addAction()

ilAppointmentPresentationGUI::addAction (   $a_txt,
  $a_link 
)

Add action.

Parameters
string$a_txt
string$a_link

Definition at line 340 of file class.ilAppointmentPresentationGUI.php.

References array.

Referenced by ilAppointmentPresentationBookingPoolGUI\collectPropertiesAndActions(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), and collectStandardPropertiesAndActions().

341  {
342  $this->actions[] = array("txt" => $a_txt, "link" => $a_link);
343  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addCalendarInfo()

ilAppointmentPresentationGUI::addCalendarInfo (   $cat_info)

Add calendar info.

Parameters
array$cat_info

Definition at line 477 of file class.ilAppointmentPresentationGUI.php.

References $_GET, addInfoProperty(), addListItemProperty(), and array.

Referenced by addCommonSection(), ilAppointmentPresentationBookingPoolGUI\collectPropertiesAndActions(), ilAppointmentPresentationPublicGUI\collectPropertiesAndActions(), and ilAppointmentPresentationUserGUI\collectPropertiesAndActions().

478  {
479  $this->ctrl->setParameterByClass("ilCalendarPresentationGUI", "category_id", $cat_info["cat_id"]);
480 
481  $link = $this->ui->renderer()->render(
482  $this->ui->factory()->button()->shy(
483  $cat_info["title"],
484  $this->ctrl->getLinkTargetByClass(array("ilPersonalDesktopGUI", "ilCalendarPresentationGUI"), "")
485  )
486  );
487 
488  $this->ctrl->setParameterByClass("ilCalendarPresentationGUI", "category_id", $_GET["category_id"]);
489 
490  $this->addInfoProperty($this->lng->txt("calendar"), $link);
491  $this->addListItemProperty($this->lng->txt("calendar"), $link);
492  }
addInfoProperty($a_txt, $a_val)
Add info property.
$_GET["client_id"]
Create styles array
The data for the language used.
addListItemProperty($a_txt, $a_val)
Add list item property.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCommonSection()

ilAppointmentPresentationGUI::addCommonSection (   $a_app,
  $a_obj_id = 0,
  $cat_info = null,
  $a_container_info = false 
)

Add common section.

Parameters
array$a_app
int$a_obj_id

Definition at line 500 of file class.ilAppointmentPresentationGUI.php.

References addCalendarInfo(), addContainerInfo(), addEventDescription(), addEventLocation(), addInfoSection(), and addObjectLinks().

Referenced by ilAppointmentPresentationMilestoneGUI\collectPropertiesAndActions(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions(), and ilAppointmentPresentationCourseGUI\collectPropertiesAndActions().

501  {
502  // event title
503  $this->addInfoSection($a_app["event"]->getPresentationTitle(false));
504 
505  // event description
506  $this->addEventDescription($a_app);
507 
508  // course title (linked of accessible)
509  if ($a_obj_id > 0) {
510  $this->addObjectLinks($a_obj_id);
511  }
512 
513  // container info (course groups)
514  if ($a_container_info) {
515  $this->addContainerInfo($a_obj_id);
516  }
517 
518  // event location
519  $this->addEventLocation($a_app);
520 
521  // calendar info
522  if ($cat_info != null) {
523  $this->addCalendarInfo($cat_info);
524  }
525  }
addEventDescription($a_app)
Add event description.
addContainerInfo($a_obj_id)
Add course/group container info.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addContainerInfo()

ilAppointmentPresentationGUI::addContainerInfo (   $a_obj_id)

Add course/group container info.

Parameters
int$a_ref_id

Definition at line 276 of file class.ilAppointmentPresentationGUI.php.

References $r, $tree, $type, ilLink\_getStaticLink(), ilObject\_lookupObjectId(), ilObject\_lookupTitle(), ilObject\_lookupType(), addInfoProperty(), addListItemProperty(), and getReadableRefIds().

Referenced by addCommonSection().

277  {
278  $refs = $this->getReadableRefIds($a_obj_id);
279  $ref_id = current($refs);
280  if (count($refs) == 1 && $ref_id > 0) {
281  $tree = $this->tree;
282  $f = $this->ui->factory();
283  $r = $this->ui->renderer();
284 
285  //parent course or group title
286  $cont_ref_id = $tree->checkForParentType($ref_id, 'grp');
287  if ($cont_ref_id == 0) {
288  $cont_ref_id = $tree->checkForParentType($ref_id, 'crs');
289  }
290 
291  if ($cont_ref_id > 0) {
292  $type = ilObject::_lookupType($cont_ref_id, true);
293  $href = ilLink::_getStaticLink($cont_ref_id);
294  $parent_title = ilObject::_lookupTitle(ilObject::_lookupObjectId($cont_ref_id));
295  $this->addInfoProperty($this->lng->txt("obj_" . $type), $r->render($f->button()->shy($parent_title, $href)));
296  $this->addListItemProperty($this->lng->txt("obj_" . $type), $r->render($f->button()->shy($parent_title, $href)));
297  }
298  }
299  }
addInfoProperty($a_txt, $a_val)
Add info property.
getReadableRefIds($a_obj_id)
Get readable ref ids.
$type
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
$r
Definition: example_031.php:79
static _lookupType($a_id, $a_reference=false)
lookup object type
addListItemProperty($a_txt, $a_val)
Add list item property.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addEventDescription()

ilAppointmentPresentationGUI::addEventDescription (   $a_app)

Add event description.

Parameters
array$a_app

Definition at line 441 of file class.ilAppointmentPresentationGUI.php.

References addInfoProperty(), and ilUtil\makeClickable().

Referenced by addCommonSection(), ilAppointmentPresentationUserGUI\collectPropertiesAndActions(), and ilAppointmentPresentationPublicGUI\collectPropertiesAndActions().

442  {
443  if ($a_app['event']->getDescription()) {
444  $this->addInfoProperty($this->lng->txt("description"), ilUtil::makeClickable(nl2br($a_app['event']->getDescription())));
445  }
446  }
addInfoProperty($a_txt, $a_val)
Add info property.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addEventLocation()

ilAppointmentPresentationGUI::addEventLocation (   $a_app)

Add event location.

Parameters
array$a_app

Definition at line 453 of file class.ilAppointmentPresentationGUI.php.

References addInfoProperty(), and addListItemProperty().

Referenced by addCommonSection(), ilAppointmentPresentationUserGUI\collectPropertiesAndActions(), and ilAppointmentPresentationPublicGUI\collectPropertiesAndActions().

454  {
455  if ($a_app['event']->getLocation()) {
456  $this->addInfoProperty($this->lng->txt("cal_where"), $a_app['event']->getLocation());
457  $this->addListItemProperty($this->lng->txt("location"), $a_app['event']->getLocation());
458  }
459  }
addInfoProperty($a_txt, $a_val)
Add info property.
addListItemProperty($a_txt, $a_val)
Add list item property.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addInfoProperty()

◆ addInfoSection()

ilAppointmentPresentationGUI::addInfoSection (   $a_txt)

◆ addLastUpdate()

ilAppointmentPresentationGUI::addLastUpdate (   $a_app)

Add last update.

Parameters
array$a_app

Definition at line 466 of file class.ilAppointmentPresentationGUI.php.

References addListItemProperty(), ilDatePresentation\formatDate(), IL_CAL_UNIX, and user().

Referenced by ilAppointmentPresentationMilestoneGUI\collectPropertiesAndActions(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions(), and ilAppointmentPresentationCourseGUI\collectPropertiesAndActions().

467  {
468  $update = new ilDateTime($a_app["event"]->getLastUpdate()->get(IL_CAL_UNIX), IL_CAL_UNIX, $this->user->getTimeZone());
469  $this->addListItemProperty($this->lng->txt('last_update'), ilDatePresentation::formatDate($update));
470  }
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
const IL_CAL_UNIX
user()
Definition: user.php:4
Date and time handling
addListItemProperty($a_txt, $a_val)
Add list item property.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addListItemProperty()

ilAppointmentPresentationGUI::addListItemProperty (   $a_txt,
  $a_val 
)

Add list item property.

Parameters
string$a_txt
string$a_val

Definition at line 328 of file class.ilAppointmentPresentationGUI.php.

References array.

Referenced by addCalendarInfo(), addContainerInfo(), addEventLocation(), addLastUpdate(), addMetaData(), addObjectLinks(), ilAppointmentPresentationMilestoneGUI\collectPropertiesAndActions(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), and ilAppointmentPresentationUserGUI\collectPropertiesAndActions().

329  {
330  #22638
331  $this->list_properties[] = array("txt" => $a_txt, "val" => $a_val);
332  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ addMetaData()

ilAppointmentPresentationGUI::addMetaData (   $a_obj_type,
  $a_obj_id,
  $a_sub_obj_type = null,
  $a_sub_obj_id = null 
)

Add metadata.

Definition at line 530 of file class.ilAppointmentPresentationGUI.php.

References addInfoProperty(), addListItemProperty(), and ilAdvancedMDRecordGUI\MODE_APP_PRESENTATION.

Referenced by ilAppointmentPresentationBookingPoolGUI\collectPropertiesAndActions(), and ilAppointmentPresentationCourseGUI\collectPropertiesAndActions().

531  {
532  //TODO: Remove the hack in ilADTActiveRecordByType.php.
533  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
534  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_APP_PRESENTATION, $a_obj_type, $a_obj_id, $a_sub_obj_type, $a_sub_obj_id);
535  $md_items = $record_gui->parse();
536  if (count($md_items)) {
537  foreach ($md_items as $md_item) {
538  $this->addInfoProperty($md_item['title'], $md_item['value']);
539  $this->addListItemProperty($md_item['title'], $md_item['value']);
540  }
541  }
542  }
addInfoProperty($a_txt, $a_val)
Add info property.
addListItemProperty($a_txt, $a_val)
Add list item property.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addObjectLinks()

ilAppointmentPresentationGUI::addObjectLinks (   $obj_id)

Add object link.

Parameters
int$ojb_id

Definition at line 389 of file class.ilAppointmentPresentationGUI.php.

References $obj_id, $title, ilLink\_getStaticLink(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), addInfoProperty(), addListItemProperty(), array, and getReadableRefIds().

Referenced by addCommonSection(), and ilAppointmentPresentationBookingPoolGUI\collectPropertiesAndActions().

390  {
391  $refs = $this->getReadableRefIds($obj_id);
392  reset($refs);
394  $buttons = array();
395  foreach ($refs as $ref_id) {
396  $link_title = $title;
397  if (count($refs) > 1) {
398  $par_ref = $this->tree->getParentId($ref_id);
399  $link_title.= " (" . ilObject::_lookupTitle(ilObject::_lookupObjId($par_ref)) . ")";
400  }
401  $buttons[] = $this->ui->renderer()->render(
402  $this->ui->factory()->button()->shy($link_title, ilLink::_getStaticLink($ref_id))
403  );
404  }
405  if ($refs == 0) {
406  $prop_value = $title;
407  } else {
408  $prop_value = implode("<br>", $buttons);
409  }
410  if ($prop_value != '') {
411  $this->addInfoProperty($this->lng->txt("obj_" . ilObject::_lookupType($obj_id)), $prop_value);
412  $this->addListItemProperty($this->lng->txt("obj_" . ilObject::_lookupType($obj_id)), $prop_value);
413  }
414  }
addInfoProperty($a_txt, $a_val)
Add info property.
getReadableRefIds($a_obj_id)
Get readable ref ids.
static _lookupTitle($a_id)
lookup object title
static _lookupObjId($a_id)
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
addListItemProperty($a_txt, $a_val)
Add list item property.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ collectPropertiesAndActions()

ilAppointmentPresentationGUI::collectPropertiesAndActions ( )

Collect properties and actions.

Definition at line 349 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML().

350  {
351  }
+ Here is the caller graph for this function:

◆ collectStandardPropertiesAndActions()

ilAppointmentPresentationGUI::collectStandardPropertiesAndActions ( )

Collect standard properties and actions.

Definition at line 356 of file class.ilAppointmentPresentationGUI.php.

References addAction(), array, and getCatInfo().

Referenced by getHTML().

357  {
358  $cat_info = $this->getCatInfo();
359 
360  //we can move this to the factory.
361  if ($cat_info['editable'] and !$this->appointment['event']->isAutoGenerated()) {
362  $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
363  // $this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed', $this->getSeed()->get(IL_CAL_DATE));
364  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $this->appointment['event']->getEntryId());
365  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dt', $this->appointment['dstart']);
366 
367  $this->addAction(
368  $this->lng->txt("edit"),
369  $this->ctrl->getLinkTargetByClass(array('ilcalendarappointmentgui'), 'askEdit')
370  );
371 
372  $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
373  // $this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
374  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $this->appointment['event']->getEntryId());
375  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dt', $this->appointment['dstart']);
376 
377  $this->addAction(
378  $this->lng->txt("delete"),
379  $this->ctrl->getLinkTargetByClass(array('ilcalendarappointmentgui'), 'askDelete')
380  );
381  }
382  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ downloadFiles()

ilAppointmentPresentationGUI::downloadFiles ( )

Download files from an appointment ( Modals )

Definition at line 582 of file class.ilAppointmentPresentationGUI.php.

References $_GET, $appointment, array, ilUtil\sendFailure(), ilUtil\sendSuccess(), ilDownloadFilesBackgroundTask\setBucketTitle(), and user().

583  {
585 
586  //calendar in the sidebar (marginal calendar)
587  if (empty($appointment)) {
588  $entry_id = (int) $_GET['app_id'];
589  $entry = new ilCalendarEntry($entry_id);
590  //if the entry exists
591  if ($entry->getStart()) {
593  "event" => $entry,
594  "dstart" => $entry->getStart(),
595  "dend" => $entry->getEnd(),
596  "fullday" => $entry->isFullday()
597  );
598  } else {
599  ilUtil::sendFailure($this->lng->txt("obj_not_found"), true);
600  $this->ctrl->returnToParent($this);
601  }
602  }
603 
604  include_once './Services/Calendar/classes/BackgroundTasks/class.ilDownloadFilesBackgroundTask.php';
605  $download_job = new ilDownloadFilesBackgroundTask($this->user->getId());
606 
607  $download_job->setBucketTitle($this->lng->txt("cal_calendar_download") . " " . $appointment['event']->getTitle());
608  $download_job->setEvents(array($appointment));
609  if ($download_job->run()) {
610  ilUtil::sendSuccess($this->lng->txt('cal_download_files_started'), true);
611  }
612  $this->ctrl->returnToParent($this);
613  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Model for a calendar entry.
$_GET["client_id"]
user()
Definition: user.php:4
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ executeCommand()

ilAppointmentPresentationGUI::executeCommand ( )

Definition at line 186 of file class.ilAppointmentPresentationGUI.php.

References $ilCtrl.

187  {
188  global $ilCtrl;
189 
190  $next_class = $ilCtrl->getNextClass();
191  $cmd = $ilCtrl->getCmd("getHTML");
192 
193  switch ($next_class) {
194  default:
195  return $this->$cmd();
196  }
197  }
global $ilCtrl
Definition: ilias.php:18

◆ getCatId()

ilAppointmentPresentationGUI::getCatId (   $a_entry_id)

Definition at line 172 of file class.ilAppointmentPresentationGUI.php.

References ilCalendarCategoryAssignments\_lookupCategory().

Referenced by ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), getCatInfo(), and readObjIdForAppointment().

173  {
175  }
static _lookupCategory($a_cal_id)
Lookup category id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCatInfo()

◆ getHTML()

ilAppointmentPresentationGUI::getHTML ( )

Get HTML.

Definition at line 202 of file class.ilAppointmentPresentationGUI.php.

References $_GET, $actions, $has_files, $i, $infoscreen, $list_item, $toolbar, $ui, ilCalendarSettings\_getInstance(), array, collectPropertiesAndActions(), collectStandardPropertiesAndActions(), getInfoScreen(), ilLinkButton\getInstance(), getListItem(), and getToolbar().

203  {
206  $ui = $this->ui;
207 
208  $infoscreen = $this->getInfoScreen();
209  if ($infoscreen instanceof ilInfoScreenGUI) {
210  foreach ($this->info_items as $i) {
211  switch ($i["type"]) {
212  case "section":
213  $infoscreen->addSection($i["txt"]);
214  break;
215  case "property":
216  $infoscreen->addProperty($i["txt"], $i["val"]);
217  break;
218  }
219  }
220  }
221 
222  $toolbar = $this->getToolbar();
223  if ($toolbar instanceof ilToolbarGUI) {
224  //todo: duplicated from ilcalendarviewgui.
225  $settings = ilCalendarSettings::_getInstance();
226  if ($settings->isBatchFileDownloadsEnabled() && $this->has_files) {
227  // file download
228  $this->ctrl->setParameter($this, "app_id", $this->appointment['event']->getEntryId());
229  $add_button = $this->ui->factory()->button()->standard(
230  $this->lng->txt("cal_download_files"),
231  $this->ctrl->getLinkTarget($this, "downloadFiles")
232  );
233  $this->ctrl->setParameter($this, "app_id", $_GET["app_id"]);
234  $toolbar->addComponent($add_button);
235  $toolbar->addSeparator();
236  }
237 
238  foreach ($this->actions as $a) {
239  $btn = ilLinkButton::getInstance();
240  $btn->setCaption($a["txt"], false);
241  $btn->setUrl($a["link"]);
242  $toolbar->addButtonInstance($btn);
243  }
244  }
245 
246  $list_item = $this->getListItem();
247  if ($list_item instanceof \ILIAS\UI\Component\Item\Standard) {
248  $dd = $list_item->getActions();
249  if ($dd === null) {
250  $actions = array();
251  $label = "";
252  } else {
253  $actions = $dd->getItems();
254  $label = $dd->getLabel();
255  }
256  $properties = $list_item->getProperties();
257 
258  foreach ($this->actions as $a) {
259  $actions[] = $ui->factory()->button()->shy($a["txt"], $a["link"]);
260  }
261  foreach ($this->list_properties as $lp) {
262  $properties[$lp["txt"]] = $lp["val"];
263  }
264 
265  $new_dd = $ui->factory()->dropdown()->standard($actions)
266  ->withLabel($label);
267  $this->list_item = $list_item->withActions($new_dd)->withProperties($properties);
268  }
269  }
collectPropertiesAndActions()
Collect properties and actions.
static _getInstance()
get singleton instance
Class ilInfoScreenGUI.
Class Factory.
$_GET["client_id"]
Class BaseForm.
Create styles array
The data for the language used.
$i
Definition: disco.tpl.php:19
collectStandardPropertiesAndActions()
Collect standard properties and actions.
+ Here is the call graph for this function:

◆ getInfoScreen()

ilAppointmentPresentationGUI::getInfoScreen ( )
Returns
ilInfoScreenGUI

Implements ilCalendarAppointmentPresentation.

Definition at line 167 of file class.ilAppointmentPresentationGUI.php.

References $infoscreen.

Referenced by ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), and getHTML().

+ Here is the caller graph for this function:

◆ getInstance()

static ilAppointmentPresentationGUI::getInstance (   $a_appointment,
  $a_info_screen,
  $a_toolbar,
  $a_list_item 
)
static
Returns
self

Definition at line 140 of file class.ilAppointmentPresentationGUI.php.

141  {
142  return new static($a_appointment, $a_info_screen, $a_toolbar, $a_list_item);
143  }

◆ getListItem()

ilAppointmentPresentationGUI::getListItem ( )

Get list item.

Returns

Definition at line 158 of file class.ilAppointmentPresentationGUI.php.

References $list_item.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getObjIdForAppointment()

ilAppointmentPresentationGUI::getObjIdForAppointment ( )
Returns
int

Definition at line 120 of file class.ilAppointmentPresentationGUI.php.

References $obj_id.

Referenced by ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions().

+ Here is the caller graph for this function:

◆ getReadableRefIds()

ilAppointmentPresentationGUI::getReadableRefIds (   $a_obj_id)

Get readable ref ids.

Parameters

Definition at line 422 of file class.ilAppointmentPresentationGUI.php.

References ilObject\_getAllReferences(), and array.

Referenced by addContainerInfo(), addObjectLinks(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationExerciseGUI\collectPropertiesAndActions(), and ilAppointmentPresentationBookingPoolGUI\collectPropertiesAndActions().

423  {
424  if (!isset($this->readable_ref_ids[$a_obj_id])) {
425  $ref_ids = array();
426  foreach (ilObject::_getAllReferences($a_obj_id) as $ref_id) {
427  if ($this->access->checkAccess("read", "", $ref_id)) {
428  $ref_ids[] = $ref_id;
429  }
430  }
431  $this->readable_ref_ids[$a_obj_id] = $ref_ids;
432  }
433  return $this->readable_ref_ids[$a_obj_id];
434  }
static _getAllReferences($a_id)
get all reference ids of object
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getToolbar()

ilAppointmentPresentationGUI::getToolbar ( )
Returns
ilToolbarGUI

Implements ilCalendarAppointmentPresentation.

Definition at line 148 of file class.ilAppointmentPresentationGUI.php.

References $toolbar.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getUserName()

ilAppointmentPresentationGUI::getUserName (   $a_user_id,
  $a_force_name = false 
)

Get (linked if possible) user name.

Parameters
int$a_user_id
Returns
string

Definition at line 550 of file class.ilAppointmentPresentationGUI.php.

References $_GET, $type, ilObject\_lookupType(), array, and ilUserUtil\getNamePresentation().

Referenced by ilAppointmentPresentationMilestoneGUI\collectPropertiesAndActions(), ilAppointmentPresentationConsultationHoursGUI\collectPropertiesAndActions(), ilAppointmentPresentationGroupGUI\collectPropertiesAndActions(), ilAppointmentPresentationCourseGUI\collectPropertiesAndActions(), ilAppointmentPresentationPublicGUI\collectPropertiesAndActions(), and ilAppointmentPresentationUserGUI\collectPropertiesAndActions().

551  {
552  $type = ilObject::_lookupType((int) $_GET["ref_id"], true);
553  $ctrl_path = array();
554  if ($type == "crs") {
555  $ctrl_path[] = "ilobjcoursegui";
556  }
557  if ($type == "grp") {
558  $ctrl_path[] = "ilobjgroupgui";
559  }
560  if (strtolower($_GET["baseClass"]) == "ilpersonaldesktopgui") {
561  $ctrl_path[] = "ilpersonaldesktopgui";
562  }
563  $ctrl_path[] = "ilCalendarPresentationGUI";
564  $ctrl_path[] = "ilpublicuserprofilegui";
565 
567  $a_user_id,
568  false,
569  true,
570  $this->ctrl->getParentReturn($this),
571  $a_force_name,
572  false,
573  true,
574  false,
575  $ctrl_path
576  );
577  }
$type
$_GET["client_id"]
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readObjIdForAppointment()

ilAppointmentPresentationGUI::readObjIdForAppointment ( )
protected

read obj_id for appointment

Definition at line 128 of file class.ilAppointmentPresentationGUI.php.

References getCatId(), and ilCalendarCategory\getInstanceByCategoryId().

Referenced by __construct().

129  {
130  $cat_id = $this->getCatId($this->appointment['event']->getEntryId());
131  $category = ilCalendarCategory::getInstanceByCategoryId($cat_id);
132  $this->obj_id = $category->getObjId();
133  }
static getInstanceByCategoryId($a_cat_id)
Get instance by category id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAppointmentPresentationGUI::$access
protected

Definition at line 76 of file class.ilAppointmentPresentationGUI.php.

◆ $actions

ilAppointmentPresentationGUI::$actions = array()
protected

Definition at line 66 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML().

◆ $appointment

◆ $ctrl

◆ $has_files

ilAppointmentPresentationGUI::$has_files = false
protected

Definition at line 86 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML().

◆ $info_items

ilAppointmentPresentationGUI::$info_items = array()
protected

Definition at line 56 of file class.ilAppointmentPresentationGUI.php.

◆ $infoscreen

ilAppointmentPresentationGUI::$infoscreen
protected

Definition at line 31 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML(), and getInfoScreen().

◆ $instance

ilAppointmentPresentationGUI::$instance
staticprotected

Definition at line 15 of file class.ilAppointmentPresentationGUI.php.

◆ $list_item

ilAppointmentPresentationGUI::$list_item = null
protected

Definition at line 51 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML(), and getListItem().

◆ $list_properties

ilAppointmentPresentationGUI::$list_properties = array()
protected

Definition at line 61 of file class.ilAppointmentPresentationGUI.php.

◆ $lng

ilAppointmentPresentationGUI::$lng
protected

Definition at line 36 of file class.ilAppointmentPresentationGUI.php.

◆ $obj_id

◆ $readable_ref_ids

ilAppointmentPresentationGUI::$readable_ref_ids
protected

Definition at line 81 of file class.ilAppointmentPresentationGUI.php.

◆ $toolbar

ilAppointmentPresentationGUI::$toolbar
protected

Definition at line 20 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML(), and getToolbar().

◆ $tree

ilAppointmentPresentationGUI::$tree
protected

Definition at line 41 of file class.ilAppointmentPresentationGUI.php.

Referenced by addContainerInfo().

◆ $ui

ilAppointmentPresentationGUI::$ui
protected

Definition at line 46 of file class.ilAppointmentPresentationGUI.php.

Referenced by getHTML().


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