ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAppointmentPresentationGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationGUI:
+ Collaboration diagram for ilAppointmentPresentationGUI:

Public Member Functions

 __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...
 
 getToolbar ()
 
 getInfoScreen ()
 

Static Public Member Functions

static getInstance (array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 

Protected Member Functions

 readObjIdForAppointment ()
 read obj_id for appointment More...
 
 buildDirectLinkForAppointment (int $a_ref_id, ?array $a_appointment=null)
 Build direct link for appointment. More...
 

Protected Attributes

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

static self $instance
 

Private Attributes

ilGlobalTemplateInterface $main_tpl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAppointmentPresentationGUI::__construct ( array  $a_appointment,
?ilInfoScreenGUI  $a_info_screen,
?ilToolbarGUI  $a_toolbar,
?Item  $a_list_item 
)

Reimplemented in ilAppointmentPresentationEmployeeTalkGUI.

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

72 {
73 global $DIC;
74 $this->main_tpl = $DIC->ui()->mainTemplate();
75
76 $this->http = $DIC->http();
77 $this->refinery = $DIC->refinery();
78 $this->appointment = $a_appointment;
79 $this->infoscreen = $a_info_screen;
80 $this->info_items = [];
81 $this->toolbar = $a_toolbar;
82 $this->lng = $DIC->language();
83 $this->lng->loadLanguageModule("dateplaner");
84 $this->tree = $DIC->repositoryTree();
85 $this->ui = $DIC->ui();
86 $this->list_item = $a_list_item;
87 $this->ctrl = $DIC->ctrl();
88 $this->access = $DIC->access();
89 $this->rbacsystem = $DIC->rbac()->system();
90 $this->user = $DIC->user();
92 }
readObjIdForAppointment()
read obj_id for appointment
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), readObjIdForAppointment(), ILIAS\Repository\refinery(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addAction()

◆ addCalendarInfo()

ilAppointmentPresentationGUI::addCalendarInfo ( array  $cat_info)

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

445 : void
446 {
447 $this->ctrl->setParameterByClass("ilCalendarPresentationGUI", "category_id", $cat_info["cat_id"]);
448
449 $link = $this->ui->renderer()->render(
450 $this->ui->factory()->button()->shy(
451 $cat_info["title"],
452 $this->ctrl->getLinkTargetByClass(array("ilDashboardGUI", "ilCalendarPresentationGUI"), "")
453 )
454 );
455
456 $this->ctrl->setParameterByClass("ilCalendarPresentationGUI", "category_id", '');
457 $this->addInfoProperty($this->lng->txt("calendar"), $link);
458 $this->addListItemProperty($this->lng->txt("calendar"), $link);
459 }
addInfoProperty(string $a_txt, string $a_val)
Add info property.
addListItemProperty(string $a_txt, string $a_val)
Add list item property.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCommonSection()

ilAppointmentPresentationGUI::addCommonSection ( array  $a_app,
int  $a_obj_id = 0,
?array  $cat_info = null,
bool  $a_container_info = false 
)

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

466 : void {
467 // event title
468 $this->addInfoSection($a_app["event"]->getPresentationTitle(false));
469
470 // event description
471 $this->addEventDescription($a_app);
472
473 // course title (linked of accessible)
474 if ($a_obj_id > 0) {
475 $this->addObjectLinks($a_obj_id, $a_app);
476 }
477
478 // container info (course groups)
479 if ($a_container_info) {
480 $this->addContainerInfo($a_obj_id);
481 }
482
483 // event location
484 $this->addEventLocation($a_app);
485
486 // calendar info
487 if ($cat_info != null) {
488 $this->addCalendarInfo($cat_info);
489 }
490 }
addContainerInfo(int $a_obj_id)
Add course/group container info.
addEventLocation(array $a_app)
Add event location.
addEventDescription(array $a_app)
Add event description.
addObjectLinks(int $obj_id, ?array $a_appointment=null)
Add object link.
addInfoSection(string $a_txt)
Add info section.

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

+ Here is the caller graph for this function:

◆ addContainerInfo()

ilAppointmentPresentationGUI::addContainerInfo ( int  $a_obj_id)

Add course/group container info.

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

239 : void
240 {
241 $refs = $this->getReadableRefIds($a_obj_id);
242 $ref_id = current($refs);
243 if (count($refs) == 1 && $ref_id > 0) {
245 $f = $this->ui->factory();
246 $r = $this->ui->renderer();
247
248 //parent course or group title
249 $cont_ref_id = $tree->checkForParentType($ref_id, 'grp');
250 if ($cont_ref_id == 0) {
251 $cont_ref_id = $tree->checkForParentType($ref_id, 'crs');
252 }
253
254 if ($cont_ref_id > 0) {
255 $type = ilObject::_lookupType($cont_ref_id, true);
256 $href = ilLink::_getStaticLink($cont_ref_id);
257 $parent_title = ilObject::_lookupTitle(ilObject::_lookupObjectId($cont_ref_id));
258 $this->addInfoProperty(
259 $this->lng->txt("obj_" . $type),
260 $r->render($f->button()->shy($parent_title, $href))
261 );
262 $this->addListItemProperty(
263 $this->lng->txt("obj_" . $type),
264 $r->render($f->button()->shy($parent_title, $href))
265 );
266 }
267 }
268 }
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
static _lookupTitle(int $obj_id)
checkForParentType(int $a_ref_id, string $a_type, bool $a_exclude_source_check=false)
Check for parent type e.g check if a folder (ref_id 3) is in a parent course obj => checkForParentTyp...
$ref_id
Definition: ltiauth.php:66

References Vendor\Package\$f, $ref_id, ilLink\_getStaticLink(), ilObject\_lookupObjectId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilTree\checkForParentType(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

Referenced by ilAppointmentPresentationSessionGUI\collectPropertiesAndActions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addEventDescription()

ilAppointmentPresentationGUI::addEventDescription ( array  $a_app)

Add event description.

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

411 : void
412 {
413 if ($a_app['event']->getDescription()) {
414 $this->addInfoProperty(
415 $this->lng->txt("description"),
416 ilUtil::makeClickable(nl2br($a_app['event']->getDescription()))
417 );
418 }
419 }
static makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)

References ILIAS\Repository\lng(), and ilUtil\makeClickable().

Referenced by ilAppointmentPresentationEmployeeTalkGUI\collectPropertiesAndActions(), ilAppointmentPresentationPublicGUI\collectPropertiesAndActions(), ilAppointmentPresentationSessionGUI\collectPropertiesAndActions(), and ilAppointmentPresentationUserGUI\collectPropertiesAndActions().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addEventLocation()

ilAppointmentPresentationGUI::addEventLocation ( array  $a_app)

Add event location.

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

424 : void
425 {
426 if ($a_app['event']->getLocation()) {
427 $this->addInfoProperty($this->lng->txt("cal_where"), $a_app['event']->getLocation());
428 $this->addListItemProperty($this->lng->txt("location"), $a_app['event']->getLocation());
429 }
430 }

References ILIAS\Repository\lng().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addInfoProperty()

◆ addInfoSection()

◆ addLastUpdate()

ilAppointmentPresentationGUI::addLastUpdate ( array  $a_app)

Add last update.

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

435 : void
436 {
437 $update = new ilDateTime(
438 $a_app["event"]->getLastUpdate()->get(IL_CAL_UNIX),
440 $this->user->getTimeZone()
441 );
442 $this->addListItemProperty($this->lng->txt('last_update'), ilDatePresentation::formatDate($update));
443 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling

References ilDatePresentation\formatDate(), IL_CAL_UNIX, ILIAS\Repository\lng(), and ILIAS\Repository\user().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addListItemProperty()

ilAppointmentPresentationGUI::addListItemProperty ( string  $a_txt,
string  $a_val 
)

◆ addMetaData()

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

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

497 : void {
498 //TODO: Remove the hack in ilADTActiveRecordByType.php.
499 $record_gui = new ilAdvancedMDRecordGUI(
501 $a_obj_type,
502 $a_obj_id,
503 (string) $a_sub_obj_type,
504 (int) $a_sub_obj_id
505 );
506 $md_items = $record_gui->parse();
507 if (count($md_items)) {
508 foreach ($md_items as $md_item) {
509 $this->addInfoProperty($md_item['title'], $md_item['value']);
510 $this->addListItemProperty($md_item['title'], $md_item['value']);
511 }
512 }
513 }

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

+ Here is the caller graph for this function:

◆ addObjectLinks()

ilAppointmentPresentationGUI::addObjectLinks ( int  $obj_id,
?array  $a_appointment = null 
)

Add object link.

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

352 : void
353 {
354 $refs = $this->getReadableRefIds($obj_id);
355 reset($refs);
357 $buttons = array();
358 foreach ($refs as $ref_id) {
359 $link_title = $title;
360 if (count($refs) > 1) {
361 $par_ref = $this->tree->getParentId($ref_id);
362 $link_title .= " (" . ilObject::_lookupTitle(ilObject::_lookupObjId($par_ref)) . ")";
363 }
364
365 $link = $this->buildDirectLinkForAppointment($ref_id, $a_appointment);
366
367 $buttons[] = $this->ui->renderer()->render(
368 $this->ui->factory()->button()->shy($link_title, $link)
369 );
370 }
371 if ($refs == 0) {
372 $prop_value = $title;
373 } else {
374 $prop_value = implode("<br>", $buttons);
375 }
376 if ($prop_value != '') {
377 $this->addInfoProperty($this->lng->txt("obj_" . ilObject::_lookupType($obj_id)), $prop_value);
378 $this->addListItemProperty($this->lng->txt("obj_" . ilObject::_lookupType($obj_id)), $prop_value);
379 }
380 }
buildDirectLinkForAppointment(int $a_ref_id, ?array $a_appointment=null)
Build direct link for appointment.
static _lookupObjId(int $ref_id)

References $ref_id, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildDirectLinkForAppointment()

ilAppointmentPresentationGUI::buildDirectLinkForAppointment ( int  $a_ref_id,
?array  $a_appointment = null 
)
protected

Build direct link for appointment.

Reimplemented in ilAppointmentPresentationExerciseGUI.

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

385 : string
386 {
387 return ilLink::_getStaticLink($a_ref_id);
388 }

References ilLink\_getStaticLink().

+ Here is the call graph for this function:

◆ collectPropertiesAndActions()

◆ collectStandardPropertiesAndActions()

ilAppointmentPresentationGUI::collectStandardPropertiesAndActions ( )

Collect standard properties and actions.

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

313 : void
314 {
315 $cat_info = $this->getCatInfo();
316
317 //we can move this to the factory.
318 if ($cat_info['editable'] && !$this->appointment['event']->isAutoGenerated()) {
319 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
320 // $this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed', $this->getSeed()->get(IL_CAL_DATE));
321 $this->ctrl->setParameterByClass(
322 'ilcalendarappointmentgui',
323 'app_id',
324 $this->appointment['event']->getEntryId()
325 );
326 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dt', $this->appointment['dstart']);
327
328 $this->addAction(
329 $this->lng->txt("edit"),
330 $this->ctrl->getLinkTargetByClass(array('ilcalendarappointmentgui'), 'askEdit')
331 );
332
333 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
334 // $this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
335 $this->ctrl->setParameterByClass(
336 'ilcalendarappointmentgui',
337 'app_id',
338 $this->appointment['event']->getEntryId()
339 );
340 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dt', $this->appointment['dstart']);
341
342 $this->addAction(
343 $this->lng->txt("delete"),
344 $this->ctrl->getLinkTargetByClass(array('ilcalendarappointmentgui'), 'askDelete')
345 );
346 }
347 }
addAction(string $a_txt, string $a_link)
Add action.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ downloadFiles()

ilAppointmentPresentationGUI::downloadFiles ( )

Download files from an appointment ( Modals )

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

564 : void
565 {
566 //calendar in the sidebar (marginal calendar)
567 if (empty($this->appointment)) {
568 $entry_id = 0;
569 if ($this->http->wrapper()->query()->has('app_id')) {
570 $entry_id = $this->http->wrapper()->query()->retrieve(
571 'app_id',
572 $this->refinery->kindlyTo()->int()
573 );
574 }
575 $entry = new ilCalendarEntry($entry_id);
576 //if the entry exists
577 if ($entry->getStart()) {
578 $this->appointment = array(
579 "event" => $entry,
580 "dstart" => $entry->getStart(),
581 "dend" => $entry->getEnd(),
582 "fullday" => $entry->isFullday()
583 );
584 } else {
585 $this->main_tpl->setOnScreenMessage('failure', $this->lng->txt("obj_not_found"), true);
586 $this->ctrl->returnToParent($this);
587 }
588 }
589 $download_job = new ilDownloadFilesBackgroundTask($this->user->getId());
590
591 $download_job->setBucketTitle($this->lng->txt("cal_calendar_download") . " " . $this->appointment['event']->getTitle());
592 $download_job->setEvents(array($this->appointment));
593 if ($download_job->run()) {
594 $this->main_tpl->setOnScreenMessage('success', $this->lng->txt('cal_download_files_started'), true);
595 }
596 $this->ctrl->returnToParent($this);
597 }
Model for a calendar entry.

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ executeCommand()

ilAppointmentPresentationGUI::executeCommand ( )

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

151 : void
152 {
153 $next_class = $this->ctrl->getNextClass();
154 $cmd = $this->ctrl->getCmd("getHTML");
155 switch ($next_class) {
156 default:
157 $this->$cmd();
158 }
159 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getCatId()

ilAppointmentPresentationGUI::getCatId ( int  $a_entry_id)

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

140 : int
141 {
143 }

References ilCalendarCategoryAssignments\_lookupCategory().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCatInfo()

◆ getHTML()

ilAppointmentPresentationGUI::getHTML ( )

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

161 : string
162 {
165 $ui = $this->ui;
166
167 $infoscreen = $this->getInfoScreen();
168 if ($infoscreen instanceof ilInfoScreenGUI) {
169 foreach ($this->info_items as $i) {
170 switch ($i["type"]) {
171 case "section":
172 $infoscreen->addSection($i["txt"]);
173 break;
174 case "property":
175 $infoscreen->addProperty($i["txt"], $i["val"]);
176 break;
177 }
178 }
179 }
180
181 $toolbar = $this->getToolbar();
182 if ($toolbar instanceof ilToolbarGUI) {
183 //todo: duplicated from ilcalendarviewgui.
185 if ($settings->isBatchFileDownloadsEnabled() && $this->has_files) {
186 // file download
187 $this->ctrl->setParameter($this, "app_id", $this->appointment['event']->getEntryId());
188 $download_btn = $ui->factory()->button()->standard(
189 $this->lng->txt("cal_download_files"),
190 $this->ctrl->getLinkTarget($this, 'downloadFiles')
191 );
192 $this->ctrl->setParameter($this, "app_id", '');
193 $toolbar->addComponent($download_btn);
195 }
196
197 foreach ($this->actions as $a) {
198 $btn = $this->ui->factory()->button()->standard(
199 $a["txt"],
200 $a["link"]
201 );
202 // all buttons are sticky
203 $toolbar->addStickyItem($btn);
204 }
205 }
206
207 $list_item = $this->getListItem();
208 if ($list_item instanceof \ILIAS\UI\Component\Item\Standard) {
209 $dd = $list_item->getActions();
210 if ($dd === null) {
211 $actions = array();
212 $label = "";
213 } else {
214 $actions = $dd->getItems();
215 $label = $dd->getLabel();
216 }
217 $properties = $list_item->getProperties();
218
219 foreach ($this->actions as $a) {
220 $actions[] = $ui->factory()->button()->shy($a["txt"], $a["link"]);
221 }
222 foreach ($this->list_properties as $lp) {
223 $properties[$lp["txt"]] = $lp["val"];
224 }
225
226 $new_dd = $ui->factory()->dropdown()
227 ->standard($actions)
228 ->withLabel($label);
229 $this->list_item = $list_item
230 ->withActions($new_dd)
231 ->withProperties($properties);
232 }
233 return '';
234 }
factory()
Get the factory that crafts UI components.
Definition: UIServices.php:36
collectStandardPropertiesAndActions()
Collect standard properties and actions.
collectPropertiesAndActions()
Collect properties and actions.
Class ilInfoScreenGUI.
addSection(string $a_title)
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addComponent(\ILIAS\UI\Component\Component $a_comp)
addStickyItem( $a_item, bool $a_output_label=false)
Add a sticky item.
Common interface to all items.
Definition: Item.php:32
withProperties(array $properties)
Get a new item with the given properties as key-value pairs.
getProperties()
Get the properties of the appointment.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References Vendor\Package\$a, ilCalendarSettings\_getInstance(), ilToolbarGUI\addComponent(), ilInfoScreenGUI\addProperty(), ilInfoScreenGUI\addSection(), ilToolbarGUI\addSeparator(), ilToolbarGUI\addStickyItem(), ILIAS\Repository\ctrl(), ILIAS\DI\UIServices\factory(), ILIAS\UI\Component\Item\Item\getProperties(), ILIAS\Repository\lng(), ILIAS\Repository\ui(), and ILIAS\UI\Component\Item\Item\withProperties().

+ Here is the call graph for this function:

◆ getInfoScreen()

ilAppointmentPresentationGUI::getInfoScreen ( )
Returns
ilInfoScreenGUI

Implements ilCalendarAppointmentPresentation.

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

136 {
137 return $this->infoscreen;
138 }

Referenced by ilAppointmentPresentationCourseGUI\collectPropertiesAndActions().

+ Here is the caller graph for this function:

◆ getInstance()

static ilAppointmentPresentationGUI::getInstance ( array  $a_appointment,
?ilInfoScreenGUI  $a_info_screen,
?ilToolbarGUI  $a_toolbar,
?Item  $a_list_item 
)
static

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

115 return new static($a_appointment, $a_info_screen, $a_toolbar, $a_list_item);
116 }

◆ getListItem()

ilAppointmentPresentationGUI::getListItem ( )

Get list item.

Returns
\ILIAS\UI\Component\Item\Item

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

127 : ?Item
128 {
129 return $this->list_item;
130 }

◆ getObjIdForAppointment()

◆ getReadableRefIds()

ilAppointmentPresentationGUI::getReadableRefIds ( int  $a_obj_id)
Parameters
int$a_obj_id
Returns
int[]

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

394 : array
395 {
396 if (!isset($this->readable_ref_ids[$a_obj_id])) {
397 $ref_ids = array();
398 foreach (ilObject::_getAllReferences($a_obj_id) as $ref_id) {
399 if ($this->access->checkAccess("read", "", $ref_id)) {
400 $ref_ids[] = $ref_id;
401 }
402 }
403 $this->readable_ref_ids[$a_obj_id] = $ref_ids;
404 }
405 return $this->readable_ref_ids[$a_obj_id];
406 }
static _getAllReferences(int $id)
get all reference ids for object ID

References $ref_id, ilObject\_getAllReferences(), and ILIAS\Repository\access().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getToolbar()

ilAppointmentPresentationGUI::getToolbar ( )

Implements ilCalendarAppointmentPresentation.

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

118 : ?ilToolbarGUI
119 {
120 return $this->toolbar;
121 }

◆ getUserName()

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

Get (linked if possible) user name.

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

518 : string
519 {
520 $ref_id = 0;
521 if ($this->http->wrapper()->query()->has('ref_id')) {
522 $ref_id = $this->http->wrapper()->query()->retrieve(
523 'ref_id',
524 $this->refinery->kindlyTo()->int()
525 );
526 }
527 $type = ilObject::_lookupType($ref_id, true);
528 $ctrl_path = array();
529 if ($type == "crs") {
530 $ctrl_path[] = "ilobjcoursegui";
531 }
532 if ($type == "grp") {
533 $ctrl_path[] = "ilobjgroupgui";
534 }
535 $baseClass = '';
536 if ($this->http->wrapper()->query()->has('baseClass')) {
537 $baseClass = $this->http->wrapper()->query()->retrieve(
538 'baseClass',
539 $this->refinery->kindlyTo()->string()
540 );
541 }
542 if (strtolower($baseClass) == "ildashboardgui") {
543 $ctrl_path[] = "ildashboardgui";
544 }
545 $ctrl_path[] = "ilCalendarPresentationGUI";
546 $ctrl_path[] = PublicProfileGUI::class;
547
549 $a_user_id,
550 false,
551 true,
552 $this->ctrl->getParentReturn($this),
553 $a_force_name,
554 false,
555 true,
556 false,
557 $ctrl_path
558 );
559 }
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:

References $ref_id, ilObject\_lookupType(), ILIAS\Repository\ctrl(), ilUserUtil\getNamePresentation(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

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

+ 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 102 of file class.ilAppointmentPresentationGUI.php.

102 : void
103 {
104 $cat_id = $this->getCatId($this->appointment['event']->getEntryId());
106 $this->obj_id = $category->getObjId();
107 }
static getInstanceByCategoryId(int $a_cat_id)

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

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilAppointmentPresentationGUI::$access
protected

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

◆ $actions

array ilAppointmentPresentationGUI::$actions = []
protected

◆ $appointment

◆ $ctrl

ilCtrlInterface ilAppointmentPresentationGUI::$ctrl
protected

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

◆ $has_files

bool ilAppointmentPresentationGUI::$has_files = false
protected

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

◆ $http

HttpServices ilAppointmentPresentationGUI::$http
protected

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

◆ $info_items

array ilAppointmentPresentationGUI::$info_items = []
protected

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

◆ $infoscreen

ilInfoScreenGUI ilAppointmentPresentationGUI::$infoscreen
protected

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

◆ $instance

self ilAppointmentPresentationGUI::$instance
staticprotected

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

◆ $list_item

Item ilAppointmentPresentationGUI::$list_item = null
protected

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

◆ $list_properties

array ilAppointmentPresentationGUI::$list_properties = []
protected

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

◆ $lng

ilLanguage ilAppointmentPresentationGUI::$lng
protected

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

◆ $main_tpl

ilGlobalTemplateInterface ilAppointmentPresentationGUI::$main_tpl
private

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

◆ $obj_id

◆ $rbacsystem

ilRbacSystem ilAppointmentPresentationGUI::$rbacsystem
protected

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

◆ $readable_ref_ids

array ilAppointmentPresentationGUI::$readable_ref_ids
protected

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

◆ $refinery

RefineryFactory ilAppointmentPresentationGUI::$refinery
protected

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

◆ $toolbar

ilToolbarGUI ilAppointmentPresentationGUI::$toolbar
protected

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

◆ $tree

ilTree ilAppointmentPresentationGUI::$tree
protected

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

◆ $ui

UIServices ilAppointmentPresentationGUI::$ui
protected

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

◆ $user


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