3 declare(strict_types=1);
35 $this->
setId(
"calmng");
38 $this->
user = $DIC->user();
41 $this->
lng->loadLanguageModule(
'dateplaner');
44 $this->
addColumn($this->
lng->txt(
'type'),
'type_sortable',
'1%');
45 $this->
addColumn($this->
lng->txt(
'title'),
'title',
'79%');
51 $this->
enable(
'select_all');
73 protected function fillRow(array $a_set): void
76 $current_selection_list->setListTitle($this->
lng->txt(
"actions"));
77 $current_selection_list->setId(
"act_" . $a_set[
'id']);
82 if ($this->actions->checkSettingsCal($a_set[
'id'])) {
84 $current_selection_list->addItem($this->
lng->txt(
'settings'),
'',
$url);
88 if ($this->actions->checkAddEvent($a_set[
'id'])) {
90 $current_selection_list->addItem($this->
lng->txt(
'cal_import_appointments'),
'',
$url);
94 if ($this->actions->checkUnshareCal($a_set[
'id'])) {
96 $current_selection_list->addItem($this->
lng->txt(
'cal_unshare'),
'',
$url);
100 if ($this->actions->checkShareCal($a_set[
'id'])) {
102 $current_selection_list->addItem($this->
lng->txt(
'cal_share'),
'',
$url);
106 if ($this->actions->checkSynchronizeCal($a_set[
'id'])) {
108 $current_selection_list->addItem($this->
lng->txt(
'cal_cal_synchronize'),
'',
$url);
112 if ($this->actions->checkDeleteCal($a_set[
'id'])) {
114 $current_selection_list->addItem($this->
lng->txt(
'delete'),
'',
$url);
116 $this->tpl->setCurrentBlock(
"checkbox");
117 $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
118 $this->tpl->parseCurrentBlock();
123 switch ($a_set[
'type']) {
126 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_system'));
131 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_personal'));
137 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_' .
$type));
143 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_type_' .
$type));
148 $this->tpl->setVariable(
'IMG_ALT', $this->
lng->txt(
'cal_ch_ch'));
153 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
154 $this->
ctrl->setParameterByClass(ilCalendarPresentationGUI::class,
'backvm', 1);
155 $this->
ctrl->setParameterByClass(
156 "ilcalendarpresentationgui",
160 $this->tpl->setVariable(
162 $this->
ctrl->getLinkTargetByClass(
163 "ilcalendarpresentationgui",
167 $this->tpl->setVariable(
'BGCOLOR', $a_set[
'color']);
168 $this->tpl->setVariable(
"ACTIONS", $current_selection_list->getHTML());
175 $tmp_title_counter = array();
176 $categories = array();
177 foreach ($cats->getCategoriesInfo() as $category) {
178 $tmp_arr[
'obj_id'] = $category[
'obj_id'];
179 $tmp_arr[
'id'] = $category[
'cat_id'];
180 $tmp_arr[
'title'] = $category[
'title'];
181 $tmp_arr[
'type'] = $category[
'type'];
189 $tmp_arr[
'color'] = $category[
'color'];
190 $tmp_arr[
'editable'] = $category[
'editable'];
191 $tmp_arr[
'accepted'] = $category[
'accepted'];
192 $tmp_arr[
'remote'] = $category[
'remote'];
194 $categories[] = $tmp_arr;
197 if ($tmp_title_counter[$category[
'type'] .
'_' . $category[
'title']] ??
false) {
198 $tmp_title_counter[$category[
'type'] .
'_' . $category[
'title']]++;
200 $tmp_title_counter[$category[
'type'] .
'_' . $category[
'title']] = 1;
204 $path_categories = array();
205 foreach ($categories as $cat) {
207 if (($tmp_title_counter[$cat[
'type'] .
'_' . $cat[
'title']] ?? 1) > 1) {
210 $path->setUseImages(
false);
211 $path->enableTextOnly(
false);
217 $path_categories[] = $cat;
219 $this->
setData($path_categories);
Creates a path for a start and endnode.
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 getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getInstance()
Get instance.
resetToDefaults()
reset table to defaults
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
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)