Shortcut for adding a warning notification.

@param string $message The notification's message
@param string $title   The notification's title
@param array  $options

@return Toastr
770848
public function warning(string $message, string $title = '', array $options = []): self
    {
        return $this->addNotification(self::WARNING, $message, $title, $options);
    }
592455
public function withError($title = '', $message = '')
    {
        $error = new MessageBag(compact('title', 'message'));

        session()->flash('error', $error);

        return $this;
    }
698789
public function publish(array $message, array $options = [])
    {
        if (!$this->em) {
            return '';
        }

        $doctrineMessage = new DoctrineMessage();
        $doctrineMessage->setQueue($this->name)
                ->setDelivered(false)
                ->setMessage($message)
                ->setLength(strlen(serialize($message)));

        $this->em->persist($doctrineMessage);
        $this->em->flush();

        return (string) $doctrineMessage->getId();
    }
865
protected function notifyDanger($message, $title = null, array $options = [])
    {
        $this->notifyFlash($message, 'danger', $title, $options);
    }
309557
private function renderHtml($message, $options = [])
    {
        $html = Html::beginTag('div', $options);
        $html .= '<div class="card-panel">';
        $html .= $message;
        $html .= '</div>';
        $html .= Html::endTag('div');

        return $html;
    }
360497
public function sendMessage($title, $msg, $icon = null)
    {
        $this->notify($title, $msg, is_string($icon) ? $icon : realpath($this->icon));

        return $this;
    }
429066
public function toastr(string $type, string $message = '', string $title = '', string $options = ''): string
    {
        return "toastr.$type('$message', '$title', $options);";
    }
1307412
public function notify(Message $message, $options=array())
    {
        $logger = $GLOBALS['logger'];
        $logger->debug(
            'Sending Voice Message ',
            array(
             $message->getFrom(),
             $message->getBody(),
            )
        );
        $path    = 'notifications/voice/send';
        $request = $this->_remoteServer->post($path);
        $request->setPostField('type', 'sms');
        $request->setPostField('from', $message->getFrom());
        $request->setPostField('to', implode(';', $message->getRecipients()));
        $request->setPostField('content', $message->getBody());

        try {
            $response = $request->send();
            if ($response->getStatusCode() !== 200) {
                throw new MessagingException();
            }

            $rawResponse = $response->getBody('true');

            return $rawResponse;
        } catch (\Exception $e) {
            throw new MessagingException();
        }

    }
1164112
public function setNotification($prefix, $title, $message, $params, int $timeout, $group)
    {

        $toast = [
            "title" => $this->getTranslations($title, $params),
            "message" => $this->getTranslations($message, $params),
            "params" => ["prefix" => $prefix, "duration" => "".$timeout],
        ];


        $this->updateValue($group, 'notification', Builder::getArray($toast, true));

    }
896583
public static function log($message, $options = array())
    {
        if (array_key_exists('inputs', $options)) {
            $inputs = $options['inputs'];
        } else {
            $inputs = array(
                self::getTimestamp(),
                'LOG',
                self::getFilename(),
                self::getLineNumber()
            );
        }

        if (!array_key_exists('output', $options)) {
            $options['output'] = 'STDOUT';
        }

        if (array_key_exists('format', $options)) {
            array_unshift($inputs, $options['format']);
        } else {
            array_unshift($inputs, self::$format);
        }

        $inputs[] = $message;

        $logMessage = self::getLogMessage($inputs);
        if (array_key_exists('colour', $options) && !empty($options['colour'])) {
            self::out($logMessage, $options['colour'], $options['output']);
        } else {
            self::out($logMessage, false, $options['output']);
        }
    }
765469
public function keyword($title, $content, $options = [])
    {
        $data = array_merge([
            'title'   => $title, 
            'content' => $content
        ], $options);

        return $this->send('keyword', $data);
    }
971308
protected function encodeMessage($message, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->encoder->setDefaultOptions($resolver);
        $options = $resolver->resolve($options);

        return $this->encoder->encode($message, $this->compressor, $options);
    }
842416
public function addToFlashMessenger($title, $message, $img = 'glyphicon glyphicon-info-sign', $logDate = null)
    {
        $this->fmContainer = new Container('fms');
        
        $container = new Container('meliscore');
        $locale = $container['melis-lang-locale'];
        
        // create date time
        if(is_null($logDate)){
            $time = date('h:i A');
            $date = date('M d y');
        }else{
            $time = date('h:i A', strtotime($logDate));
            $date = date('M d y',  strtotime($logDate));
        }

        $translatorSvc = $this->getServiceLocator()->get('MelisCoreTranslation');

        $tool       = $this->getServiceLocator()->get('MelisCoreTool');

        $title      = $tool->escapeHtml($title);
        $title      = !empty($translatorSvc->getMessage($title, $locale))? $translatorSvc->getMessage($title, $locale) : $title;
        $message    = $tool->escapeHtml($message);
        $message    = !empty($translatorSvc->getMessage($message, $locale))? $translatorSvc->getMessage($message, $locale) : $message;
        
        $curFlashMessages = $this->fmContainer->flashMessages;
        $newFlashMessage = array(
            'title' => $title,
            'message'=> $message,
            'image'  => $img,
            'time' => $time,
            'date' => $date,
            'date_trans' => $this->dateMod($date, $locale),
        );
        
        if(!empty($curFlashMessages))
        {
            array_push($curFlashMessages, $newFlashMessage);
        }
        else 
        {
            $curFlashMessages[0] = $newFlashMessage;
        }
        
        $this->fmContainer->flashMessages = $curFlashMessages;
    }
186470
public function success($message, $title = null)
    {
        return $this->getAlertLibrary(true)->success((string)$message, (string)$title);
    }
420494
protected function notifySuccess($message, $title = null, array $options = [])
    {
        $this->notifyFlash($message, 'success', $title, $options);
    }
882819
public function writeSelectPrompt($message, &$options)
    {
        $this->writeLine();

        // translate options
        foreach ($options as $optionKey => $optionValue) {
            $options[$optionKey] = $this->translator->translate($optionValue);
        }

        // write prompt badge
        $this->writeBadge('badge_pick', Color::RED);

        // output prompt
        $prompt = new Select(
            $this->translator->translate($message),
            $options,
            false,
            false
        );

        $answer = $prompt->show();

        $this->writeLine();

        return strtolower($answer);
    }
864028
public function overlay($message, $title = 'Notice')
    {
        $this->message($message, $title);

        $this->session->flash('flash_notification.overlay', true);

        return $this;
    }