Create a single toastr.

@param string      $type
@param string      $message
@param string|null $title
@param string|null $options

@return string
429066
public function toastr(string $type, string $message = '', string $title = '', string $options = ''): string
    {
        return "toastr.$type('$message', '$title', $options);";
    }
688991
public function message($title='', $text='', $type='', $options=[])
    {
        $this->params['title'] = $title;
        $this->params['text'] = $text;
        $this->params['type'] = $type;
        if (isset($options)) {
            $this->params = array_merge($this->params, $options);
        }

        
        session()->flash('sweetalert.json', json_encode($this->params));

        return $this;
    }
1031712
public function message($message, $type = 'alert')
    {
        $messages = [];

        if(!empty($message)) {

            // It loooked if exist any old messages
            if (!empty(session('noty.messages'))) {
                $messages = session('noty.messages');
            }

            // Add last new message if it's not in array
            if(!collect(array_flatten($messages))->contains($message)){
                $messages[] = [
                  'text' => $message,
                  'type' => $type,
                ];
            }
        }

        $this->session->flash('noty.messages', $messages);
        $this->session->flash('noty.config', $this->config);

        if(in_array($type, ['success', 'error', 'warning', 'information', 'notification'])) {
            $this->session->flash('noty.config.type', $type);
        }

        return $this;
    }
256643
public function add($message = null, $type = 'notice')
    {
        if (!isset($this->messages[$type]) || !is_array($this->messages[$type])) {
            $this->messages[$type] = [];
        }
        if ($message) {
            $this->messages[$type][] = $message;
        }
        $this->writeToSession();
        return $this;
    }
493214
public function _message($type, $message)
    {
        $cssClasses = isset($this->_cssClasses[$type]) ? $this->_cssClasses[$type] : '';

        $defaultMessages = [];
        $messages = $this->session->get($this->_sessionKey, $defaultMessages);
        $messages[] = '<div class="' . $cssClasses . '">' . $message . '</div>' . PHP_EOL;
        $this->session->set($this->_sessionKey, $messages);
    }
828628
public function alert($message, $type = 'info') 
	{
		Argument::i()
			->test(2, 'string')
			->test(3, 'string');

		return Alert::i($message, $type);
	}
50236
public function addMessage($message, $type) {
		if(!($this->session->get($this->sessionKey, [])) == null)
		{
			$messages = $this->session->get($this->sessionKey, []);
		}
		
		$messages[] = [
			'message' => $message,
			'type' => $type,
		];
		
		$this->session->set($this->sessionKey, $messages);
	}
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;
    }
350137
final public function enqueueMessage($text, $title='', $type=NULL) {
		
		$this->app->enqueueMessage($text, $title, $type);
		
	}
1309244
public function addMessage($message, $type) {
		if (isset($_SESSION[$this->sessionKey]))
		{
			$messages = $_SESSION[$this->sessionKey];
		}
		
		$messages[] = [
			'message' => $message,
			'type' => $type,
		];
		
		$_SESSION[$this->sessionKey] = $messages;
	}
1036590
public function showMessage(int $type, string $message): Promise
    {
        return $this->handler->notify('window/showMessage', ['type' => $type, 'message' => $message]);
    }
1000840
function (type, message, title, isHtml) {

        if (!title) {
            title = message;
            message = undefined;
        }

        var messageContent = {
            title: title
        };

        if (isHtml) {
            var el = document.createElement('div');
            el.innerHTML = message;

            messageContent.content = el;
        } else {
            messageContent.text = message;
        }

        var opts = $.extend(
            {},
            abp.libs.sweetAlert.config['default'],
            abp.libs.sweetAlert.config[type],
            messageContent
        );

        return $.Deferred(function ($dfd) {
            sweetAlert(opts).then(function () {
                $dfd.resolve();
            });
        });
    }
801520
public function info(string $message, string $title = '', array $options = []): self
    {
        return $this->addNotification(self::INFO, $message, $title, $options);
    }
488531
public function startWrite($message, array $options = null) {
		return $this->startEvent($message, ProfileInterface::TYPE_WRITE, $options);
	}
684722
protected function output($message, $type = self::OUTPUT_INFO)
    {
        $output = $this->getOutput();

        if ($output === null) {
            return;
        }

        // Chose color type of message
        switch ($type) {
            case self::OUTPUT_COMMENT:
                $logMethod = 'info';
                $prefix = '<comment>';
                $postfix = '</comment>';
                break;

            case self::OUTPUT_ERROR:
                $logMethod = 'critical';
                $prefix = '<error>';
                $postfix = '</error>';
                break;

            case self::OUTPUT_INFO:
            default:
                $logMethod = 'info';
                $prefix = '<info>';
                $postfix = '</info>';
                break;
        }

        $psrLogBase = self::PSR_LOG_BASE;
        $consoleBase = self::SYMFONY_CONSOLE_BASE;

        if ($output instanceof $psrLogBase) {
            $output->$logMethod($message);

        } else {
            if ($output instanceof $consoleBase) {
                $output->writeln($prefix . $message . $postfix);
            }
        }

    }
1101016
public static function make(string $type, string $message, string $url = null) : ResponseHelper {
        return new static($type, $message, $url);
    }
971964
public function flashMessage(
        $message,
        $type = FlashMessage::TYPE_SUCCESS,
        $method = FlashMessage::METHOD_APPEND
    ) {
        $message = new FlashMessage($message, $type, $method);
        $this->register($message);

        return $message;
    }