30 public function __construct(?
object $a_parent_obj,
string $a_parent_cmd)
34 $this->
user = $DIC->user();
35 $this->
lng = $DIC->language();
36 $this->
lng->loadLanguageModule(
'dateplaner');
37 $this->
ctrl = $DIC->ctrl();
39 $this->
setId(
'calinbox');
43 $this->
addColumn($this->
lng->txt(
'date'),
'begin',
"30%");
44 $this->
addColumn($this->
lng->txt(
'title'),
'title',
"40%");
45 #$this->addColumn($this->lng->txt('cal_duration'),'duration',"15%");
46 $this->
addColumn($this->
lng->txt(
'cal_recurrences'),
'frequence',
"15%");
47 $this->
addColumn($this->
lng->txt(
'last_update'),
'last_update',
"15%");
50 $this->
setRowTemplate(
"tpl.show_changed_appointment_row.html",
"components/ILIAS/Calendar");
61 protected function fillRow(array $a_set): void
63 $this->tpl->setVariable(
'VAL_DESCRIPTION', $a_set[
'description']);
65 $this->tpl->setVariable(
'VAL_TITLE_LINK', $a_set[
'title']);
66 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $a_set[
'id']);
67 $this->tpl->setVariable(
'VAL_LINK', $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
69 switch ($a_set[
'frequence']) {
71 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->
lng->txt(
'cal_daily'));
75 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->
lng->txt(
'cal_weekly'));
79 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->
lng->txt(
'cal_monthly'));
83 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->
lng->txt(
'cal_yearly'));
87 #$this->tpl->setVariable('VAL_FREQUENCE',$this->lng->txt('cal_no_recurrence'));
90 if ($a_set[
'fullday']) {
101 $this->tpl->setVariable(
'VAL_BEGIN', $date);
109 foreach ($a_apps as $event) {
110 $entry = $event[
'event'];
114 $tmp_arr[
'id'] = $entry->getEntryId();
115 $tmp_arr[
'title'] = $entry->getPresentationTitle();
116 $tmp_arr[
'description'] = $entry->getDescription();
117 $tmp_arr[
'fullday'] = $entry->isFullday();
119 $tmp_arr[
'begin'] = $event[
'dstart'];
120 $tmp_arr[
'end'] = $event[
'dend'];
122 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
123 if ($tmp_arr[
'fullday']) {
124 $tmp_arr[
'duration'] += (60 * 60 * 24);
126 if (!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin']) {
127 $tmp_arr[
'duration'] =
'';
130 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
131 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
133 $appointments[] = $tmp_arr;
137 $appointments = array_slice($appointments, 0, $this->
getLimit());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(?object $a_parent_obj, string $a_parent_cmd)
setAppointments(array $a_apps)
fillRow(array $a_set)
Standard Version of Fill Row.
const string FREQ_MONTHLY
static _getFirstRecurrence($a_cal_id)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
@classDescription Date and time handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setFormName(string $a_name="")
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
setData(array $a_data)
Set table data.
enable(string $a_module_name)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc