3 declare(strict_types=1);
    36     public function __construct(
object $a_gui, 
string $a_cmd, 
int $a_user_id)
    38         $this->user_id = $a_user_id;
    46         $this->renderer = $DIC->ui()->renderer();
    47         $this->uiFactory = $DIC->ui()->factory();
    50         $this->
addColumn($this->
lng->txt(
'appointment'), 
'start');
    53             $this->
addColumn($this->
lng->txt(
'cal_ch_grp_header'), 
'group');
    57         $this->
addColumn($this->
lng->txt(
'cal_ch_num_bookings'), 
'num_bookings');
    58         $this->
addColumn($this->
lng->txt(
'cal_ch_bookings'), 
'participants');
    59         $this->
addColumn($this->
lng->txt(
'cal_ch_target_object'), 
'target');
    62         $this->
setRowTemplate(
'tpl.ch_upcoming_row.html', 
'Services/Calendar');
    74         $this->
addMultiCommand(
'searchUsersForAppointments', $this->
lng->txt(
'cal_ch_assign_participants'));
    91     protected function fillRow(array $a_set): void
    93         $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
    94         $this->tpl->setVariable(
'START', $a_set[
'start_p']);
    95         $this->tpl->setVariable(
'TITLE', $a_set[
'title']);
    98             $this->tpl->setVariable(
'TITLE_GROUP', $a_set[
'group']);
   101         $this->tpl->setVariable(
'NUM_BOOKINGS', $a_set[
'num_bookings']);
   103         foreach ((array) ($a_set[
'target_links'] ?? []) as $link) {
   104             $this->tpl->setCurrentBlock(
'links');
   105             $this->tpl->setVariable(
'TARGET', $link[
'title']);
   106             $this->tpl->setVariable(
'URL_TARGET', $link[
'link']);
   107             $this->tpl->parseCurrentBlock();
   109         if ($a_set[
'bookings']) {
   110             foreach ($a_set[
'bookings'] as $user_id => $name) {
   112                 if (($user_profile_prefs[
"public_profile"] ?? 
'') == 
"y") {
   113                     $this->tpl->setCurrentBlock(
'booking_with_link');
   115                     $this->tpl->setVariable(
   117                         $this->
ctrl->getLinkTarget($this->getParentObject(), 
'showprofile')
   120                     $this->tpl->setCurrentBlock(
'booking_without_link');
   123                 $this->tpl->setVariable(
'TXT_BOOKING', $name);
   124                 $this->tpl->parseCurrentBlock();
   128         $this->tpl->setVariable(
'BOOKINGS', implode(
', ', $a_set[
'bookings']));
   131         $dropDownItems = array(
   132             $this->uiFactory->button()->shy(
   133                 $this->
lng->txt(
'edit'),
   136             $this->uiFactory->button()->shy(
   137                 $this->
lng->txt(
'cal_ch_assign_participants'),
   138                 $this->
ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI', 
'')
   140             $this->uiFactory->button()->shy(
   141                 $this->
lng->txt(
'delete'),
   145         $dropDown = $this->uiFactory->dropdown()->standard($dropDownItems)
   146                 ->withLabel($this->
lng->txt(
'actions'));
   147         $this->tpl->setVariable(
'ACTIONS', $this->renderer->render($dropDown));
   155             $data[$counter][
'id'] = $app->getEntryId();
   156             $data[$counter][
'title'] = $app->getTitle();
   157             $data[$counter][
'description'] = $app->getDescription();
   164             $booked_user_ids = array_map(
'intval', 
ilUtil::_sortIds($booked_user_ids, 
'usr_data', 
'lastname', 
'usr_id'));
   166             $data[$counter][
'participants'] = 
'';
   168             foreach ($booked_user_ids as $user_id) {
   169                 if (!$user_counter) {
   171                     $data[$counter][
'participants'] = $name[
'lastname'];
   176             $data[$counter][
'bookings'] = $users;
   177             $data[$counter][
'num_bookings'] = $booking->getNumberOfBookings();
   179             $data[$counter][
'group'] = 
'';
   180             $group_id = $booking->getBookingGroup();
   187             $obj_ids = array_map(
   189                 ilUtil::_sortIds($booking->getTargetObjIds(), 
'object_data', 
'title', 
'obj_id')
   191             foreach ($obj_ids as $obj_id) {
   198                 $data[$counter][
'target_links'][$refs_counter][
'link'] = ilLink::_getLink(end($refs));
 
static lookupTitle(int $a_group_id)
Lookup group title. 
 
__construct(object $a_gui, string $a_cmd, int $a_user_id)
 
enable(string $a_module_name)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
getCurrentBookings(int $a_entry_id)
get current bookings 
 
static _lookupFullname(int $a_user_id)
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
static _getPreferences(int $user_id)
get preferences for user 
 
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...
 
static _lookupName(int $a_user_id)
lookup user name 
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
static _lookupTitle(int $obj_id)
 
UIImplementationFactory $uiFactory
 
setDefaultOrderField(string $a_defaultorderfield)
 
static getCountGroupsOfUser(int $a_user_id)
Get number of consultation hour groups. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getAppointments(int $a_user_id)
Get all appointments. 
 
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
 
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. 
 
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14. 
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
addMultiCommand(string $a_cmd, string $a_text)