64 : string
65 {
67 $tpl =
new ilTemplate(
"tpl.navigation_header.html",
true,
true,
"Services/Calendar");
68
69
70 $contains_today = false;
72 $this->
ctrl->setParameterByClass(get_class($this->cmdClass),
'seed', $this->seed->get(
IL_CAL_DATE));
73 $b1 = $this->
ui->factory()->button()->standard(
74 $this->
lng->txt(
"previous"),
75 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
76 );
77
78
81 switch ($this->increment) {
84 "TXT_TITLE",
87 );
89 $contains_today = true;
90 }
91 break;
92
95 $this->seed,
96 $this->user_settings->getWeekStart()
97 )->get();
98 $start = current($weekday_list);
99 $end = end($weekday_list);
105 $contains_today = true;
106 }
107 break;
108
111 "TXT_TITLE",
114 );
116 $contains_today = true;
117 }
118 break;
119 }
121 $this->
ctrl->setParameterByClass(
122 get_class($this->cmdClass),
123 'seed',
125 );
126 if ($contains_today) {
127 $b2 = $this->
ui->factory()->button()->standard(
128 $this->
lng->txt(
"today"),
129 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
130 )->withEngagedState(true);
131 } else {
132 $b2 = $this->
ui->factory()->button()->standard(
133 $this->
lng->txt(
"today"),
134 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
135 );
136 }
137
139 $this->
ctrl->setParameterByClass(get_class($this->cmdClass),
'seed', $this->seed->get(
IL_CAL_DATE));
140 $b3 = $this->
ui->factory()->button()->standard(
141 $this->
lng->txt(
"next"),
142 $this->ctrl->getLinkTarget($this->cmdClass, $this->cmd)
143 );
144 $this->
ctrl->setParameterByClass(get_class($this->cmdClass),
'seed',
'');
145 $this->
toolbar->addStickyItem($this->
ui->factory()->viewControl()->section($b1, $b2, $b3));
146 $this->
toolbar->addSeparator();
147
149 }
static _buildWeekDayList(ilDate $a_day, int $a_weekstart)
build week day list @access public
static _numericDayToString(int $a_day, bool $a_long=true)
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)
@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.