19 declare(strict_types=1);
    41         $this->
setId(
"calmng");
    44         $this->
user = $DIC->user();
    45         $this->renderer = $DIC->ui()->renderer();
    46         $this->ui_factory = $DIC->ui()->factory();
    49         $this->
lng->loadLanguageModule(
'dateplaner');
    52         $this->
addColumn($this->
lng->txt(
'type'), 
'type_sortable', 
'1%');
    53         $this->
addColumn($this->
lng->txt(
'title'), 
'title', 
'79%');
    56         $this->
setRowTemplate(
"tpl.manage_row.html", 
"components/ILIAS/Calendar");
    59         $this->
enable(
'select_all');
    81     protected function fillRow(array $a_set): void
    83         $dropDownItems = array();
    88         if ($this->actions->checkSettingsCal($a_set[
'id'])) {
    90             $dropDownItems[] = $this->ui_factory->button()->shy(
    91                 $this->
lng->txt(
'settings'),
    97         if ($this->actions->checkAddEvent($a_set[
'id'])) {
    99             $dropDownItems[] = $this->ui_factory->button()->shy(
   100                 $this->
lng->txt(
'cal_import_appointments'),
   106         if ($this->actions->checkUnshareCal($a_set[
'id'])) {
   108             $dropDownItems[] = $this->ui_factory->button()->shy(
   109                 $this->
lng->txt(
'cal_unshare'),
   115         if ($this->actions->checkShareCal($a_set[
'id'])) {
   117             $dropDownItems[] = $this->ui_factory->button()->shy(
   118                 $this->
lng->txt(
'cal_share'),
   124         if ($this->actions->checkSynchronizeCal($a_set[
'id'])) {
   126             $dropDownItems[] = $this->ui_factory->button()->shy(
   127                 $this->
lng->txt(
'cal_cal_synchronize'),
   133         if ($this->actions->checkDeleteCal($a_set[
'id'])) {
   135             $dropDownItems[] = $this->ui_factory->button()->shy(
   136                 $this->
lng->txt(
'delete'),
   140             $this->tpl->setCurrentBlock(
"checkbox");
   141             $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
   142             $this->tpl->parseCurrentBlock();
   147         switch ($a_set[
'type']) {
   150                 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_system'));
   155                 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_personal'));
   161                 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_' . $type));
   167                 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_' . $type));
   172                 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_ch_ch'));
   176         $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
   177         $this->
ctrl->setParameterByClass(ilCalendarPresentationGUI::class, 
'backvm', 1);
   178         $this->
ctrl->setParameterByClass(
   179             "ilcalendarpresentationgui",
   183         $this->tpl->setVariable(
   185             $this->
ctrl->getLinkTargetByClass(
   186                 "ilcalendarpresentationgui",
   190         $this->
ctrl->clearParameterByClass(
   191             "ilcalendarpresentationgui",
   195         $dropDown = $this->ui_factory->dropdown()->standard($dropDownItems)
   196                                      ->withLabel($this->
lng->txt(
"actions"));
   198         $this->tpl->setVariable(
'BGCOLOR', $a_set[
'color']);
   199         $this->tpl->setVariable(
"ACTIONS", $this->renderer->render($dropDown));
   206         $tmp_title_counter = array();
   207         $categories = array();
   208         foreach ($cats->getCategoriesInfo() as $category) {
   209             $tmp_arr[
'obj_id'] = $category[
'obj_id'];
   210             $tmp_arr[
'id'] = $category[
'cat_id'];
   211             $tmp_arr[
'title'] = $category[
'title'];
   212             $tmp_arr[
'type'] = $category[
'type'];
   220             $tmp_arr[
'color'] = $category[
'color'];
   221             $tmp_arr[
'editable'] = $category[
'editable'];
   222             $tmp_arr[
'accepted'] = $category[
'accepted'];
   223             $tmp_arr[
'remote'] = $category[
'remote'];
   225             $categories[] = $tmp_arr;
   228             if ($tmp_title_counter[$category[
'type'] . 
'_' . $category[
'title']] ?? 
false) {
   229                 $tmp_title_counter[$category[
'type'] . 
'_' . $category[
'title']]++;
   231                 $tmp_title_counter[$category[
'type'] . 
'_' . $category[
'title']] = 1;
   235         $path_categories = array();
   236         foreach ($categories as $cat) {
   238                 if (($tmp_title_counter[$cat[
'type'] . 
'_' . $cat[
'title']] ?? 1) > 1) {
   241                         $path->setUseImages(
false);
   242                         $path->enableTextOnly(
false);
   248             $path_categories[] = $cat;
   250         $this->
setData($path_categories);
 
enable(string $a_module_name)
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
static _getAllReferences(int $id)
get all reference ids for object ID 
 
static getInstance()
Get instance. 
 
resetToDefaults()
reset table to defaults 
 
show list of alle calendars to manage 
 
setFormName(string $a_name="")
 
__construct(object $a_parent_obj)
 
ilCalendarActions $actions
 
resetOffset(bool $a_in_determination=false)
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
setOrderDirection(string $a_order_direction)
 
setDefaultOrderField(string $a_defaultorderfield)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory) 
 
setDefaultOrderDirection(string $a_defaultorderdirection)
 
static _getInstance($a_usr_id=0)
get singleton instance 
 
setOrderField(string $a_order_field)
 
static lookupCategorySortIndex(int $a_type_id)
Lookup sort index of calendar type. 
 
__construct(Container $dic, ilPlugin $plugin)
 
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)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _lookupType(int $id, bool $reference=false)
 
addMultiCommand(string $a_cmd, string $a_text)