/** * Send an order notification to admin if one has not already been sent. */ public function sendNotification() { if (!$this->NotificationSent) { $notification = new NotificationEmail($this->Member(), $this); if ($notification->send()) { $this->NotificationSent = true; $this->write(); } } }