2include_once 
'./Services/Calendar/classes/class.ilCalendarViewGUI.php';
 
   56        $this->ctrl->saveParameter($this, 
"cal_agenda_per");
 
   61        if ((
int) $qp[
"cal_agenda_per"] > 0 && (
int) $qp[
"cal_agenda_per"] <= 4) {
 
   62            $this->period = $qp[
"cal_agenda_per"];
 
   67        $get_seed = $qp[
"seed"];
 
   68        $this->ctrl->setParameterByClass(
"ilcalendarinboxgui", 
"seed", $this->seed->get(
IL_CAL_DATE));
 
   70        switch ($this->period) {
 
   87        $this->period_end_day = $end_date->get(
IL_CAL_DATE);
 
   95        $next_class = $this->ctrl->getNextClass($this);
 
   96        $cmd = $this->ctrl->getCmd(
"getHTML");
 
   98        switch ($next_class) {
 
   99            case "ilcalendarappointmentpresentationgui":
 
  100                $this->ctrl->setReturn($this, 
"");
 
  101                include_once(
"./Services/Calendar/classes/class.ilCalendarAppointmentPresentationGUI.php");
 
  103                $this->ctrl->forwardCommand($gui);
 
  107                $this->ctrl->setReturn($this, 
"");
 
  108                if (in_array($cmd, array(
"getHTML", 
"getModalForApp"))) {
 
  109                    return $this->$cmd();
 
  123        $navigation->getHTML();
 
  126        $this->ctrl->setReturn($this, 
"");
 
  132        $df = new \ILIAS\Data\Factory();
 
  139        foreach ($events as $e) {
 
  140            if ($e[
'event']->isFullDay()) {
 
  172            if ($group_date->isNull()) {
 
  181                $groups[] = $this->ui_factory->item()->group(
 
  197            $properties = array();
 
  206            $this->ctrl->setParameter($this, 
'app_id', $e[
"event"]->getEntryId());
 
  207            $this->ctrl->setParameter($this, 
'dt', $e[
'dstart']);
 
  208            $this->ctrl->setParameter($this, 
'seed', $this->seed->get(
IL_CAL_DATE));
 
  210            $url = $this->ctrl->getLinkTarget($this, 
"getModalForApp", 
"", 
true, 
false);
 
  211            $this->ctrl->setParameter($this, 
"app_id", 
$_GET[
"app_id"]);
 
  212            $this->ctrl->setParameter($this, 
"dt", 
$_GET[
"dt"]);
 
  213            $this->ctrl->setParameter($this, 
'modal_title', 
$_GET[
"modal_title"]);
 
  214            $modal = $this->ui_factory->modal()->roundtrip(
'', [])->withAsyncRenderUrl(
$url);
 
  215            $shy = $this->ui_factory->button()->shy($e[
"event"]->getPresentationTitle(
false), 
"")->withOnClick($modal->getShowSignal());
 
  218            if ($e[
'event']->isFullDay()) {
 
  219                $lead_text = $this->lng->txt(
"cal_all_day");
 
  223            $li = $this->ui_factory->item()->standard($shy)
 
  224                ->withDescription(
"" . nl2br(strip_tags($e[
"event"]->
getDescription())))
 
  225                ->withLeadText($lead_text)
 
  226                ->withProperties($properties)
 
  227                ->withColor($df->color(
'#' . $cat_info[
"color"]));
 
  230                $li = $li_edited_by_plugin;
 
  234            include_once(
"./Services/Calendar/classes/class.ilCalendarAppointmentPresentationGUI.php");
 
  236            $app_gui->setListItemMode($li);
 
  237            $this->ctrl->getHTML($app_gui);
 
  238            $items[] = $app_gui->getListItem();
 
  241        if (!$group_date->isNull()) {
 
  242            $groups[] = $this->ui_factory->item()->group(
 
  249        $images = array_fill(1, 4, 
"<span class=\"ilAdvNoImg\"></span>");
 
  250        if ($cal_agenda_per = (
int) 
$_GET[
'cal_agenda_per']) {
 
  251            $images[$cal_agenda_per] = 
"<img src='./templates/default/images/icon_checked.svg' alt='Month'>";
 
  253            $images[
$this->period] = 
"<img src='./templates/default/images/icon_checked.svg' alt='Month'>";
 
  256        #21479 Set seed if the view does not contain any event. 
  257        $this->ctrl->setParameter($this, 
'seed', $this->seed->get(
IL_CAL_DATE));
 
  260        $this->ctrl->setParameter($this, 
"cal_agenda_per", self::PERIOD_DAY);
 
  261        $items[] = $this->ui_factory->button()->shy($images[1] . 
"1 " . $this->lng->txt(
"day"), $this->ctrl->getLinkTarget($this, 
"getHTML"));
 
  262        $this->ctrl->setParameter($this, 
"cal_agenda_per", self::PERIOD_WEEK);
 
  263        $items[] = $this->ui_factory->button()->shy($images[2] . 
"1 " . $this->lng->txt(
"week"), $this->ctrl->getLinkTarget($this, 
"getHTML"));
 
  264        $this->ctrl->setParameter($this, 
"cal_agenda_per", self::PERIOD_MONTH);
 
  265        $items[] = $this->ui_factory->button()->shy($images[3] . 
"1 " . $this->lng->txt(
"month"), $this->ctrl->getLinkTarget($this, 
"getHTML"));
 
  266        $this->ctrl->setParameter($this, 
"cal_agenda_per", self::PERIOD_HALF_YEAR);
 
  267        $items[] = $this->ui_factory->button()->shy($images[4] . 
"6 " . $this->lng->txt(
"months"), $this->ctrl->getLinkTarget($this, 
"getHTML"));
 
  268        $this->ctrl->setParameter($this, 
"cal_agenda_per", $this->period);
 
  271        $actions = $this->ui_factory->dropdown()->standard($items)->withLabel($this->lng->txt(
"days"));
 
  275        if ($this->period != self::PERIOD_DAY) {
 
  281        $list = $this->ui_factory->panel()->listing()->standard($list_title, $groups)
 
  282            ->withActions($actions);
 
  285        $comps = array_merge($modals, array(
$list));
 
  287        $html =  $this->ui_renderer->render($comps);
 
  289        if (count($groups) == 0) {
 
  290            $tpl = $this->ui->mainTemplate();
 
  291            $html.= 
$tpl->getMessageHTML($this->lng->txt(
"cal_no_events_info"));
 
  306            $plugin->setAppointment($appointment, $appointment->getStart());
 
  307            $li = $plugin->editAgendaItem($a_item);
 
  321        if ((
int) $qp[
"cal_agenda_per"] > 0 && (
int) $qp[
"cal_agenda_per"] <= 4) {
 
  322            return $qp[
"cal_agenda_per"];
 
An exception for terminatinating execution or to throw for unit testing.
getPluginAgendaItem($a_item, $appointment)
executeCommand()
Execute command.
__construct(ilDate $seed)
Constructor.
static getPeriod()
needed in CalendarInboxGUI to get events using a proper period.
static _getInstance(ilDate $seed, $a_app)
get singleton instance
static _getInstance($a_usr_id=0)
get singleton instance
static _lookupCategory($a_cal_id)
Lookup category id.
const CAL_PRESENTATION_AGENDA_LIST
getActivePlugins($a_slot_id)
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
@classDescription Date and time handling
static _equals(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check if two date are equal.
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static get($a_var)
Get a value.
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(isset($_REQUEST['delete'])) $list