/** * This is a handler that creates an array of calendar items and then * combines them together to make a string that is used in the iCalendar * functionality. * * @return type */ public function calendar() { $hookname = 'hook_calendar'; $moduleList = $this->AppUI->getLoadableModuleList(); foreach ($moduleList as $module) { if (class_exists($module['mod_main_class'])) { $object = new $module['mod_main_class'](); if (is_callable(array($object, $hookname))) { try { $itemList = $object->{$hookname}($this->AppUI->user_id); if (count($itemList)) { foreach ($itemList as $calendarItem) { $buffer .= w2p_Output_iCalendar::formatCalendarItem($calendarItem, $module['mod_directory']); } } } catch (Exception $exc) { error_log('Error in ' . __FUNCTION__ . ' -- ' . $exc->getMessage()); } } } } return $buffer; }
public static function formatCalendarItem($calendarItem, $module_name) { trigger_error("w2p_API_iCalendar has been deprecated in v3.0 and will be removed by v4.0. Please use w2p_Output_iCalendar instead.", E_USER_NOTICE); return parent::formatCalendarItem($calendarItem, $module_name); }