3 declare(strict_types=1);
    43     public function setBkId(
int $bkid = 0): void
    48     public function initialize(
int $a_calendar_presentation_type): void
    50         parent::initialize($a_calendar_presentation_type);
    51         $this->tabs_gui->setSubTabActive(
'app_month');
    54         if ($this->
user->getTimeZone()) {
    55             $this->timezone = $this->
user->getTimeZone();
    61         $this->
ctrl->saveParameter($this, 
'seed');
    63         $next_class = $this->
ctrl->getNextClass();
    64         switch ($next_class) {
    65             case "ilcalendarappointmentpresentationgui":
    66                 $this->
ctrl->setReturn($this, 
"");
    68                 $this->
ctrl->forwardCommand($gui);
    70             case 'ilcalendarappointmentgui':
    71                 $this->
ctrl->setReturn($this, 
'');
    72                 $this->tabs_gui->setSubTabActive((
string) 
ilSession::get(
'cal_last_tab'));
    76                 $this->
ctrl->forwardCommand($app);
    80                 $time = microtime(
true);
    81                 $cmd = $this->
ctrl->getCmd(
"show");
    83                 $this->main_tpl->setContent($this->tpl->get());
    93         $this->schedule_filters[] = $a_filter;
    96     public function show(): void
    98         $this->tpl = 
new ilTemplate(
'tpl.month_view.html', 
true, 
true, 
'components/ILIAS/Calendar');
   103         $this->tpl->setVariable(
'NAVIGATION', $navigation->getHTML());
   105         for ($i = $this->user_settings->getWeekStart(); $i < (7 + $this->user_settings->getWeekStart()); $i++) {
   106             $this->tpl->setCurrentBlock(
'month_header_col');
   108             $this->tpl->parseCurrentBlock();
   113             $disable_empty = 
true;
   118                 $disable_empty = 
false;
   122                 $disable_empty = 
false;
   127         $is_portfolio_embedded = 
false;
   130             $is_portfolio_embedded = 
true;
   133         $scheduler->addSubitemCalendars(
true);
   134         if (
sizeof($this->schedule_filters)) {
   135             foreach ($this->schedule_filters as $filter) {
   136                 $scheduler->addFilter($filter);
   139         $scheduler->calculate();
   147             $this->user_settings->getWeekStart()
   150             $has_events = (bool) $this->
showEvents($scheduler, $date);
   152             if (!$this->view_with_appointments && $has_events) {
   153                 $this->view_with_appointments = 
true;
   157                 $this->
ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
   158                 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'idate', $date->get(
IL_CAL_DATE));
   159                 $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'seed', $this->seed->get(
IL_CAL_DATE));
   160                 $new_app_url = $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui', 
'add');
   162                 $this->tpl->setCurrentBlock(
"new_app");
   163                 $this->tpl->setVariable(
   165                     $this->ui_renderer->render($this->ui_factory->symbol()->glyph()->add($new_app_url))
   167                 $this->tpl->parseCurrentBlock();
   181             if (!$is_portfolio_embedded &&
   182                 (!$disable_empty || $has_events)) {
   183                 $this->tpl->setCurrentBlock(
'month_day_link');
   184                 $this->
ctrl->clearParametersByClass(
'ilcalendardaygui');
   185                 $this->
ctrl->setParameterByClass(
'ilcalendardaygui', 
'seed', $date->get(
IL_CAL_DATE));
   186                 $this->tpl->setVariable(
'OPEN_DAY_VIEW', $this->
ctrl->getLinkTargetByClass(
'ilcalendardaygui', 
''));
   187                 $this->
ctrl->clearParametersByClass(
'ilcalendardaygui');
   189                 $this->tpl->setCurrentBlock(
'month_day_no_link');
   192             $this->tpl->setVariable(
'MONTH_DAY', $month_day);
   194             $this->tpl->parseCurrentBlock();
   196             $this->tpl->setCurrentBlock(
'month_col');
   199                 $this->tpl->setVariable(
'TD_CLASS', 
'caltoday');
   201                 $this->tpl->setVariable(
'TD_CLASS', 
'calstd');
   203                 $this->tpl->setVariable(
'TD_CLASS', 
'calprev');
   205                 $this->tpl->setVariable(
'TD_CLASS', 
'calnext');
   207             $this->tpl->parseCurrentBlock();
   208             if ($counter && !($counter % 7)) {
   209                 $this->tpl->setCurrentBlock(
'month_row');
   210                 $this->tpl->parseCurrentBlock();
   218         return $this->tpl->get();
   225         foreach ($scheduler->
getByDay($date, $this->timezone) as $item) {
   226             $this->
ctrl->clearParametersByClass(
'ilcalendarappointmentgui');
   227             $this->
ctrl->setParameterByClass(
'ilcalendarappointmentgui', 
'app_id', $item[
'event']->getEntryId());
   229             $event_tpl = 
new ilTemplate(
'tpl.month_event_view.html', 
true, 
true, 
'components/ILIAS/Calendar');
   231             if (!$item[
'event']->isFullDay()) {
   232                 switch ($this->user_settings->getTimeFormat()) {
   234                         $time = $item[
'event']->getStart()->get(
IL_CAL_FKT_DATE, 
'H:i', $this->timezone);
   238                         $time = $item[
'event']->getStart()->get(
IL_CAL_FKT_DATE, 
'h:ia', $this->timezone);
   245             $event_html = ($time != 
"") ? $time . 
" " . $shy : $shy;
   246             $event_tpl->setCurrentBlock(
'il_event');
   249             $event_tpl->setVariable(
   251                 $this->
ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui', 
'edit')
   253             $event_tpl->setVariable(
'EVENT_NUM', $item[
'event']->getEntryId());
   254             $event_tpl->setVariable(
'EVENT_CONTENT', $event_html);
   255             $color = $this->app_colors->getColorByAppointment($item[
'event']->getEntryId());
   256             $event_tpl->setVariable(
'EVENT_BGCOLOR', $color);
   257             $event_tpl->setVariable(
'EVENT_ADD_STYLES', $item[
'event']->getPresentationStyle());
   268                 $event_body_html = $event_html_by_plugin;
   270                 $event_tpl->parseCurrentBlock();
   271                 $event_body_html = $event_tpl->get();
   274             $this->tpl->setCurrentBlock(
"event_nfd");
   275             $this->tpl->setVariable(
"EVENT_CONTENT", $event_body_html);
   276             $this->tpl->parseCurrentBlock();
   278             $this->num_appointments++;
 static _getInstance(ilDate $seed, array $a_app)
get singleton instance 
 
static get(string $a_var)
 
static _buildMonthDayList(int $a_month, int $a_year, int $weekstart)
Build a month day list. 
 
getByDay(ilDate $a_start, string $a_timezone)
 
showEvents(ilCalendarSchedule $scheduler, ilDate $date)
 
static _before(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets. 
 
getContentByPlugins(ilCalendarEntry $a_cal_entry, int $a_start_date, string $a_content, ilTemplate $a_tpl)
 
const CAL_PRESENTATION_MONTH
 
static _numericMonthToString(int $a_month, bool $a_long=true, ilLanguage $lng=null)
numeric month to string 
 
initAppointmentIdFromQuery()
 
addScheduleFilter(ilCalendarScheduleFilter $a_filter)
Add schedule filter. 
 
static _getInstanceByUserId(int $a_user_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Calendar schedule filter interface. 
 
__construct(ilDate $seed_date)
 
initBookingUserFromQuery()
 
initialize(int $a_calendar_presentation_type)
 
static initDragDrop(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Drag and Drop used in Modules/Survey, Services/Calendar, Services/COPage, Services/Form (Jan 2022) 
 
const MODE_PORTFOLIO_CONSULTATION
 
ilCalendarUserSettings $user_settings
 
initInitialDateFromQuery()
 
static _getInstance($a_usr_id=0)
get singleton instance 
 
static _numericDayToString(int $a_day, bool $a_long=true, ilLanguage $lng=null)
 
ilCalendarAppointmentColors $app_colors
 
Administrate calendar appointments. 
 
__construct(Container $dic, ilPlugin $plugin)
 
static calculateFontColor(string $a_html_color_code)
Calculate best font color from html hex color code. 
 
static _equals(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
Check if two date are equal. 
 
getAppointmentShyButton(ilCalendarEntry $a_calendar_entry, string $a_dstart, string $a_title_forced="")
 
static _isToday(ilDateTime $date)
 
Represents a list of calendar appointments (including recurring events) for a specific user in a give...