function display(array $data = array()) { $data = parent::display($data); if (!defined('CALENDAR_ROOT')) { define('CALENDAR_ROOT', xarModVars::get('calendar', 'pearcalendar_root')); } include_once CALENDAR_ROOT . 'Month/Weekdays.php'; include_once CALENDAR_ROOT . 'Decorator/Textual.php'; sys::import("modules.calendar.class.Calendar.Decorator.Xaraya"); // Build the month $data['content'] = xarMod::apiFunc('calendar', 'user', 'getuserdatetimeinfo'); $data['content']['MonthCal'] = new Calendar_Month_Weekdays($data['content']['cal_year'], $data['content']['cal_month'], CALENDAR_FIRST_DAY_OF_WEEK); $data['content']['MonthCal']->build(); return $data; }
/** * Display func. * @param $blockinfo array * @returns $blockinfo array */ function display(array $data = array()) { $data = parent::display($data); if (empty($data)) { return; } if (!defined('CALENDAR_ROOT')) { define('CALENDAR_ROOT', xarModVars::get('calendar', 'pearcalendar_root')); } include_once CALENDAR_ROOT . 'Calendar.php'; $tplData['form_action'] = xarModURL('calendar', 'user', 'changecalnav'); $tplData['blockid'] = $data['bid']; if (xarServer::getVar('REQUEST_METHOD') == 'GET') { // URL of this page $tplData['return_url'] = xarServer::getCurrentURL(); } else { // Base URL of the site $tplData['return_url'] = xarServer::getBaseURL(); } $data['content'] = $tplData; return $data; }