$items) { if($memberID) { $email = new $emailTemplateClass(); $email->populateTemplate(new ArrayData(array( "Recipient" => DataObject::get_by_id("Member", $memberID), "BrokenPages" => new DataObjectSet($items), ))); $email->debug(); $email->send(); $count++; } } } return $count; } /** * Get all the items that were passed with this event type. * @param eventType A string, this should match the eventType passed to {@link event()} */ static function getItems($eventType) { $allItems = array(); if(isset(Notifications::$events[$eventType])) { foreach(Notifications::$events[$eventType] as $memberID => $items) { $allItems = array_merge($allItems, (array)$items); } } return $allItems; } } ?>