コード例 #1
0
 function getNotificationType($id)
 {
     static $notific_types;
     $notification_types = NotificationsManager::getNotificationTypes();
     if (isset($notific_types[$id])) {
         return $notific_types[$id];
     }
     if (isset($notification_types[0])) {
         foreach ($notification_types as $notification_type) {
             if ($notification_type->id == $id) {
                 $notific_types[$id] = $notification_type;
                 return $notification_type;
             }
         }
     } else {
         return false;
     }
 }