public function handle(NotificationInterface $notification, $level)
    {
        if ($notification instanceof AttributeAwareInterface)
        {
            $options = $notification->attributes();
        }
        else
        {
            $options = [];
        }

        if ($notification instanceof TitleAwareInterface)
        {
            $options['header'] = $notification->title();
        }

        $variable = [
            'message' => $notification->message(),
            'type'    => isset($this->levelMapping[$level]) ? $this->levelMapping[$level] : self::STANDARD,
            'options' => $options
        ];

        $current = $this->smarty->getTemplateVars($this->var);

        if (!$current)
        {
            $this->smarty->assign($this->var, [$variable]);
        }
        else
        {
            $this->smarty->append($this->var, $variable);
        }

        return true;
    }
public function handle(NotificationInterface $notification, $level)
    {
        if ($notification instanceof AttributeAwareInterface)
        {
            $options = $notification->attributes();
        }
        else
        {
            $options = [];
        }

        if ($notification instanceof TitleAwareInterface)
        {
            $options['header'] = $notification->title();
        }

        $variable = [
            'message' => $notification->message(),
            'type'    => isset($this->levelMapping[$level]) ? $this->levelMapping[$level] : self::STANDARD,
            'options' => $options
        ];

        $current = $this->smarty->getTemplateVars($this->var);

        if (!$current)
        {
            $this->smarty->assign($this->var, [$variable]);
        }
        else
        {
            $this->smarty->append($this->var, $variable);
        }

        return true;
    }
public function handle ( NotificationInterface $ notification , $ level ) { if ( $ notification instanceof AttributeAwareInterface ) { $ options = $ notification -> attributes ( ) ; } else { $ options = [ ] ; } if ( $ notification instanceof TitleAwareInterface ) { $ options [ 'header' ] = $ notification -> title ( ) ; } $ variable = [ 'message' => $ notification -> message ( ) , 'type' => isset ( $ this -> levelMapping [ $ level ] ) ? $ this -> levelMapping [ $ level ] : self :: STANDARD , 'options' => $ options ] ; $ current = $ this -> smarty -> getTemplateVars ( $ this -> var ) ; if ( ! $ current ) { $ this -> smarty -> assign ( $ this -> var , [ $ variable ] ) ; } else { $ this -> smarty -> append ( $ this -> var , $ variable ) ; } return true ; }
Handle a notification.

@return  boolean
Handle a notification .