/** * Parse */ private function parse() { // get agenda (null means unlimited items) $agenda = FrontendAgendaModel::getAllUpcomingAgendaItems(); // assign agenda $this->tpl->assign('widgetUpcomingAgendaFull', $agenda); }
private function loadData() { $this->topitems = FrontendAgendaModel::getAllUpcomingAgendaItems(0, 4); $this->items = FrontendAgendaModel::getAllUpcomingAgendaItems(4); }
/** * Get the data (agenda) */ private function getData() { $this->topitems = FrontendAgendaModel::getAllUpcomingAgendaItems(0, 4); $this->items = FrontendAgendaModel::getAllUpcomingAgendaItems(4); // // requested view // $this->view = $this->URL->getParameter('view', 'string', 'month'); // // // requested timestamp // $this->timestamp = $this->URL->getParameter('timestamp', 'string', time()); // // if ($this->URL->getParameter('timestamp', 'string')) { // // add no-index, so the additional pages (next/previous day,month,week,year) won't get accidentally indexed // $this->header->addMetaData(array('name' => 'robots', 'content' => 'noindex, nofollow'), true); // } // calculate the timespan of view // $timespan = self::calculateTimespan($this->view, $this->timestamp); // get agenda between timespan // $this->items = FrontendAgendaModel::getAllByDate($timespan['beginTimestamp'], $timespan['endTimestamp']); // sort dates // usort($this->items, "self::cmpValues"); // generate next and previous timestamp // $nextTimestamp = strtotime('+1 ' . $this->view . 's', $this->timestamp); // $prevTimestamp = strtotime('-1 ' . $this->view . 's', $this->timestamp); // // // generate next and previous urls // $this->nextUrl = '?timestamp=' . $nextTimestamp . '&view=' . $this->view; // $this->prevUrl = '?timestamp=' . $prevTimestamp . '&view=' . $this->view; }