function handler_ical(PlPage $page, PlUser $user) { require_once 'ical.inc.php'; $page->changeTpl('carnet/calendar.tpl', NO_SKIN); $page->register_function('display_ical', 'display_ical'); $filter = new UserFilter(new UFC_Contact($user)); $profiles = $filter->iterProfiles(); $page->assign('events', PlIteratorUtils::map($profiles, array($this, 'buildBirthRef'))); pl_cached_content_headers('text/calendar', 1); }