- $annivs = Array();
- foreach ($filter->getUsers() as $u) {
- $profile = $u->profile();
- $date = strtotime($profile->birthdate);
- $tomorrow = $date + 86400;
- $annivs[] = array(
- 'timestamp' => strtotime($user->registration_date),
- 'date' => date('Ymd', $date),
- 'tomorrow' => date('Ymd', $tomorrow),
- 'hruid' => $profile->hrid(),
- 'summary' => 'Anniversaire de ' . $profile->fullName(true)
- );
- }
- $page->assign('events', $annivs);
+ $profiles = $filter->iterProfiles();
+ $page->assign('events', PlIteratorUtils::map($profiles, array($this, 'buildBirthRef')));