19 declare(strict_types=1);
    73         $this->main_tpl = $DIC->ui()->mainTemplate();
    75         $this->
http = $DIC->http();
    77         $this->appointment = $a_appointment;
    78         $this->infoscreen = $a_info_screen;
    79         $this->info_items = [];
    81         $this->
lng = $DIC->language();
    82         $this->
lng->loadLanguageModule(
"dateplaner");
    83         $this->tree = $DIC->repositoryTree();
    84         $this->
ui = $DIC->ui();
    85         $this->list_item = $a_list_item;
    86         $this->
ctrl = $DIC->ctrl();
    87         $this->
access = $DIC->access();
    88         $this->rbacsystem = $DIC->rbac()->system();
    89         $this->
user = $DIC->user();
   103         $cat_id = $this->
getCatId($this->appointment[
'event']->getEntryId());
   105         $this->obj_id = $category->getObjId();
   109         array $a_appointment,
   114         return new static($a_appointment, $a_info_screen, $a_toolbar, $a_list_item);
   146         $cat_id = $this->
getCatId($this->appointment[
'event']->getEntryId());
   152         $next_class = $this->
ctrl->getNextClass();
   153         $cmd = $this->
ctrl->getCmd(
"getHTML");
   154         switch ($next_class) {
   168             foreach ($this->info_items as $i) {
   169                 switch ($i[
"type"]) {
   186                 $this->
ctrl->setParameter($this, 
"app_id", $this->appointment[
'event']->getEntryId());
   187                 $download_btn = $ui->
factory()->button()->standard(
   188                     $this->
lng->txt(
"cal_download_files"),
   189                     $this->
ctrl->getLinkTarget($this, 
'downloadFiles')
   191                 $this->
ctrl->setParameter($this, 
"app_id", 
'');
   196             foreach ($this->actions as 
$a) {
   197                 $btn = $this->
ui->factory()->button()->standard(
   208             $dd = $list_item->getActions();
   213                 $actions = $dd->getItems();
   214                 $label = $dd->getLabel();
   218             foreach ($this->actions as 
$a) {
   219                 $actions[] = $ui->
factory()->button()->shy($a[
"txt"], $a[
"link"]);
   221             foreach ($this->list_properties as $lp) {
   222                 $properties[$lp[
"txt"]] = $lp[
"val"];
   225             $new_dd = $ui->
factory()->dropdown()
   228             $this->list_item = $list_item
   229                 ->withActions($new_dd)
   242         if (count($refs) == 1 && 
$ref_id > 0) {
   244             $f = $this->
ui->factory();
   245             $r = $this->
ui->renderer();
   249             if ($cont_ref_id == 0) {
   253             if ($cont_ref_id > 0) {
   258                     $this->
lng->txt(
"obj_" . $type),
   259                     $r->render(
$f->button()->shy($parent_title, $href))
   262                     $this->
lng->txt(
"obj_" . $type),
   263                     $r->render(
$f->button()->shy($parent_title, $href))
   274         $this->info_items[] = array(
"type" => 
"section", 
"txt" => $a_txt);
   282         $this->info_items[] = array(
"type" => 
"property", 
"txt" => $a_txt, 
"val" => $a_val);
   291         $this->list_properties[] = array(
"txt" => $a_txt, 
"val" => $a_val);
   297     public function addAction(
string $a_txt, 
string $a_link): void
   299         $this->actions[] = array(
"txt" => $a_txt, 
"link" => $a_link);
   317         if ($cat_info[
'editable'] && !$this->appointment[
'event']->isAutoGenerated()) {
   318             $this->
ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
   320             $this->
ctrl->setParameterByClass(
   321                 'ilcalendarappointmentgui',
   323                 $this->appointment[
'event']->getEntryId()
   325             $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'dt', $this->appointment[
'dstart']);
   328                 $this->
lng->txt(
"edit"),
   329                 $this->
ctrl->getLinkTargetByClass(array(
'ilcalendarappointmentgui'), 
'askEdit')
   332             $this->
ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
   334             $this->
ctrl->setParameterByClass(
   335                 'ilcalendarappointmentgui',
   337                 $this->appointment[
'event']->getEntryId()
   339             $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'dt', $this->appointment[
'dstart']);
   342                 $this->
lng->txt(
"delete"),
   343                 $this->
ctrl->getLinkTargetByClass(array(
'ilcalendarappointmentgui'), 
'askDelete')
   358             $link_title = $title;
   359             if (count($refs) > 1) {
   360                 $par_ref = $this->tree->getParentId($ref_id);
   366             $buttons[] = $this->
ui->renderer()->render(
   367                 $this->
ui->factory()->button()->shy($link_title, $link)
   371             $prop_value = $title;
   373             $prop_value = implode(
"<br>", $buttons);
   375         if ($prop_value != 
'') {
   395         if (!isset($this->readable_ref_ids[$a_obj_id])) {
   398                 if ($this->
access->checkAccess(
"read", 
"", $ref_id)) {
   402             $this->readable_ref_ids[$a_obj_id] = $ref_ids;
   404         return $this->readable_ref_ids[$a_obj_id];
   412         if ($a_app[
'event']->getDescription()) {
   414                 $this->
lng->txt(
"description"),
   425         if ($a_app[
'event']->getLocation()) {
   437             $a_app[
"event"]->getLastUpdate()->
get(
IL_CAL_UNIX),
   439             $this->
user->getTimeZone()
   446         $this->
ctrl->setParameterByClass(
"ilCalendarPresentationGUI", 
"category_id", $cat_info[
"cat_id"]);
   448         $link = $this->
ui->renderer()->render(
   449             $this->
ui->factory()->button()->shy(
   451                 $this->
ctrl->getLinkTargetByClass(array(
"ilDashboardGUI", 
"ilCalendarPresentationGUI"), 
"")
   455         $this->
ctrl->setParameterByClass(
"ilCalendarPresentationGUI", 
"category_id", 
'');
   463         ?array $cat_info = null,
   464         bool $a_container_info = 
false   467         $this->
addInfoSection($a_app[
"event"]->getPresentationTitle(
false));
   478         if ($a_container_info) {
   486         if ($cat_info != null) {
   494         ?
string $a_sub_obj_type = null,
   495         ?
int $a_sub_obj_id = null
   502             (
string) $a_sub_obj_type,
   505         $md_items = $record_gui->parse();
   506         if (count($md_items)) {
   507             foreach ($md_items as $md_item) {
   517     public function getUserName(
int $a_user_id, 
bool $a_force_name = 
false): string
   520         if ($this->
http->wrapper()->query()->has(
'ref_id')) {
   521             $ref_id = $this->
http->wrapper()->query()->retrieve(
   527         $ctrl_path = array();
   528         if ($type == 
"crs") {
   529             $ctrl_path[] = 
"ilobjcoursegui";
   531         if ($type == 
"grp") {
   532             $ctrl_path[] = 
"ilobjgroupgui";
   535         if ($this->
http->wrapper()->query()->has(
'baseClass')) {
   536             $baseClass = $this->
http->wrapper()->query()->retrieve(
   538                 $this->
refinery->kindlyTo()->string()
   541         if (strtolower($baseClass) == 
"ildashboardgui") {
   542             $ctrl_path[] = 
"ildashboardgui";
   544         $ctrl_path[] = 
"ilCalendarPresentationGUI";
   545         $ctrl_path[] = 
"ilpublicuserprofilegui";
   551             $this->
ctrl->getParentReturn($this),
   566         if (empty($this->appointment)) {
   568             if ($this->
http->wrapper()->query()->has(
'app_id')) {
   569                 $entry_id = $this->
http->wrapper()->query()->retrieve(
   576             if ($entry->getStart()) {
   577                 $this->appointment = array(
   579                     "dstart" => $entry->getStart(),
   580                     "dend" => $entry->getEnd(),
   581                     "fullday" => $entry->isFullday()
   584                 $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"obj_not_found"), 
true);
   585                 $this->
ctrl->returnToParent($this);
   590         $download_job->
setBucketTitle($this->
lng->txt(
"cal_calendar_download") . 
" " . $this->appointment[
'event']->getTitle());
   591         $download_job->setEvents(array($this->appointment));
   592         if ($download_job->run()) {
   593             $this->main_tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_download_files_started'), 
true);
   595         $this->
ctrl->returnToParent($this);
 
ilInfoScreenGUI $infoscreen
 
readObjIdForAppointment()
read obj_id for appointment 
 
static getInstance(array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
collectPropertiesAndActions()
Collect properties and actions. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
addCalendarInfo(array $cat_info)
 
addObjectLinks(int $obj_id, ?array $a_appointment=null)
Add object link. 
 
const MODE_APP_PRESENTATION
 
__construct(array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
addListItemProperty(string $a_txt, string $a_val)
Add list item property. 
 
static _lookupCategory(int $a_cal_id)
 
Class ChatMainBarProvider . 
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
addProperty(string $a_name, string $a_value, string $a_link="")
add a property to current section 
 
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
 
addEventDescription(array $a_app)
Add event description. 
 
setBucketTitle(string $a_title)
 
getReadableRefIds(int $a_obj_id)
 
Description of class class. 
 
addInfoSection(string $a_txt)
Add info section. 
 
addInfoProperty(string $a_txt, string $a_val)
Add info property. 
 
static _lookupObjId(int $ref_id)
 
addLastUpdate(array $a_app)
Add last update. 
 
Provides fluid interface to RBAC services. 
 
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...
 
static http()
Fetches the global http state from ILIAS. 
 
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='ilpublicuserprofilegui')
Default behaviour is: 
 
static _lookupTitle(int $obj_id)
 
downloadFiles()
Download files from an appointment ( Modals ) 
 
Common interface to all items. 
 
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
 
addEventLocation(array $a_app)
Add event location. 
 
static _lookupObjectId(int $ref_id)
 
addSection(string $a_title)
 
getUserName(int $a_user_id, bool $a_force_name=false)
Get (linked if possible) user name. 
 
static _getInstance($a_usr_id=0)
get singleton instance 
 
ilGlobalTemplateInterface $main_tpl
 
getProperties()
Get the properties of the appointment. 
 
addCommonSection(array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
 
static getInstanceByCategoryId(int $a_cat_id)
 
withProperties(array $properties)
Get a new item with the given properties as key-value pairs. 
 
getListItem()
Get list item. 
 
addAction(string $a_txt, string $a_link)
Add action. 
 
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples 
 
buildDirectLinkForAppointment(int $a_ref_id, ?array $a_appointment=null)
Build direct link for appointment. 
 
factory()
Get the factory that crafts UI components. 
 
RefineryFactory $refinery
 
getCatId(int $a_entry_id)
 
static _lookupType(int $id, bool $reference=false)
 
addMetaData(string $a_obj_type, int $a_obj_id, ?string $a_sub_obj_type=null, ?int $a_sub_obj_id=null)
 
static makeClickable(string $a_text, bool $detectGotoLinks=false)
 
collectStandardPropertiesAndActions()
Collect standard properties and actions. 
 
addContainerInfo(int $a_obj_id)
Add course/group container info.