58 : string
59 {
61 $tpl =
new ilTemplate(
"tpl.navigation_header.html",
true,
true,
"components/ILIAS/Calendar");
62
63
64 $contains_today = false;
66 $this->
ctrl->setParameterByClass(get_class($this->cmdClass),
'seed', $this->seed->get(
IL_CAL_DATE));
67 $b1 = $this->
ui->factory()->button()->standard(
68 $this->
lng->txt(
"previous"),
69 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
70 );
71
72
75 switch ($this->increment) {
78 "TXT_TITLE",
81 );
83 $contains_today = true;
84 }
85 break;
86
89 $this->seed,
90 $this->user_settings->getWeekStart()
91 )->get();
92 $start = current($weekday_list);
93 $end = end($weekday_list);
99 $contains_today = true;
100 }
101 break;
102
105 "TXT_TITLE",
108 );
110 $contains_today = true;
111 }
112 break;
113 }
115 $this->
ctrl->setParameterByClass(
116 get_class($this->cmdClass),
117 'seed',
119 );
120 if ($contains_today) {
121 $b2 = $this->
ui->factory()->button()->standard(
122 $this->
lng->txt(
"today"),
123 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
124 )->withEngagedState(true);
125 } else {
126 $b2 = $this->
ui->factory()->button()->standard(
127 $this->
lng->txt(
"today"),
128 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
129 );
130 }
131
133 $this->
ctrl->setParameterByClass(get_class($this->cmdClass),
'seed', $this->seed->get(
IL_CAL_DATE));
134 $b3 = $this->
ui->factory()->button()->standard(
135 $this->
lng->txt(
"next"),
136 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
137 );
138 $this->
ctrl->setParameterByClass(get_class($this->cmdClass),
'seed',
'');
139 $this->
toolbar->addStickyItem($this->
ui->factory()->viewControl()->section($b1, $b2, $b3));
140 $this->
toolbar->addSeparator();
141
143 }
static _numericDayToString(int $a_day, bool $a_long=true, ?ilLanguage $lng=null)
static _buildWeekDayList(ilDate $a_day, int $a_weekstart)
build week day list @access public
static setUseRelativeDates(bool $a_status)
set use relative dates
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static _within(ilDateTime $dt, ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
Check whether an date is within a date duration given by start and end.
special template class to simplify handling of ITX/PEAR
static now()
Return current timestamp in Y-m-d H:i:s format.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.