/**
     * @param Notification $notification
     * @return string
     */
    private function renderNotification(Notification $notification)
    {
        $classNameSuffix = $this->getClassNameSuffix($notification->getType());
        return <<<HTML
<div class="alert alert-{$classNameSuffix}" role="alert">
    {$notification->getMessage()}
</div>

HTML;
    }
Esempio n. 2
0
 /**
  * @param Notification $notification
  * @return void
  */
 public function send(Notification $notification)
 {
     $this->session->push($this->newKey(), ['type' => $notification->getType(), 'message' => $notification->getMessage()]);
 }