public function get_menu_content() { $tpl = new FileTemplate('calendar/CalendarModuleMiniMenu.tpl'); $tpl->add_lang(LangLoader::get('common', 'calendar')); $tpl->put('CALENDAR', CalendarAjaxCalendarController::get_view(true)); return $tpl->render(); }
private function build_view(HTTPRequestCustom $request) { $year = $request->get_getint('year', date('Y')); $month = $request->get_getint('month', date('n')); $day = $request->get_getint('day', date('j')); if (!checkdate($month, $day, $year)) { $this->tpl->put('MSG', MessageHelper::display($this->lang['calendar.error.e_invalid_date'], MessageHelper::ERROR)); $year = date('Y'); $month = date('n'); $day = date('j'); } $this->tpl->put_all(array('CALENDAR' => CalendarAjaxCalendarController::get_view(false, $year, $month), 'EVENTS' => CalendarAjaxEventsController::get_view($year, $month, $day))); return $this->tpl; }