Notify with `toast.exe`.

@param string $title
@param string $message
@param string $icon    optional

@return void
192575
protected function notify($title, $message, $icon = null)
    {
        $app = __DIR__ . '/../../bin/toast.exe';

        $title   = iconv('UTF-8', 'ASCII//TRANSLIT', $title);
        $message = iconv('UTF-8', 'ASCII//TRANSLIT', $message);

        $icon = is_string($icon) ? " -p \"$icon\"" : $this->icon;
        $this->execute("$app -t \"{$title}\" -m \"{$message}\"$icon");
    }
544720
public function addMessage(string $message, int $icon = Template::ICON_NULL){
        $this->messages[]   = [
            "icon"      => Template::getIconName($icon),
            "message"   => trim($message),
        ];

        return $this;
    }
986353
public function addNotification(string $type, string $message, string $title = '', array $options = []): self
    {
        $this->notifications[] = [
            'type'    => in_array($type, $this->allowedTypes, true) ? $type : self::WARNING,
            'title'   => $this->escapeSingleQuote($title),
            'message' => $this->escapeSingleQuote($message),
            'options' => json_encode($options),
        ];

        $this->session->flash(self::TOASTR_NOTIFICATIONS, $this->notifications);

        return $this;
    }
122800
protected function baseNotification($message, $bgColor, $icon, $iconColor, $escape = true)
    {
        $s  = "<?php echo '<div class=\"flex ".$bgColor." bg-circuit bg-md rounded text-center text-white text-sm font-bold mb-6 px-4 py-3 shadow\" role=\"alert\">";
        $s .= '<div class="bg-white rounded shadow-lg -mt-6 w-8 h-8">';
        $s .= '<div class="h-full flex justify-center items-center '.$iconColor.'">';
        $s .= $this->getIconString($icon, '', 24, 24);
        $s .= '</div></div>';
        if ($escape) {
            $s .= "<p class=\"ml-3\">'.e($message).'</p>";
        } else {
            $s .= "<p class=\"ml-3\">'.$message.'</p>";
        }
        $s .= "</div>'; ?>";

        return $s;
    }
203094
public function danger($title, $content, $icon = true, $iconSmall = true)
    {
        $this->message('danger', $title, $content, $icon, $iconSmall);
    }
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;
    }
271400
def _growlnotify(title, message):
    

    try:
        paths = common.extract_app_paths(['growlnotify'])
    except ValueError:
        return

    common.shell_process([paths[0], '-t', title, '-m', message])
1160779
protected function showSuccess($title, $messages = '', $output)
    {
        $output->writeln("<info>$title</info>");
        $output->writeln('');
        if (is_array($messages)) {
            foreach ($messages as $message) {
                $output->writeln("$message");
            }
            $output->writeln('');
        } elseif ($messages != '') {
            $output->writeln($messages);
            $output->writeln('');
        }
    }
1360647
def growl( title, message, priority )
      message.tr!("`", "'")
      if @coalesce then coalesce(title, message, priority)
      else call_growl(title, message, priority) end
    end
55880
public function dialog( $message = '', $title = '', $level = null ) {
		return $this->overlay( $message, $title, $level );
	}
87312
public static function create($title = null, $message = null, $data = [], $priority = self::PRIORITY_NORMAL, $sound = self::DEFAULT_SOUND, $notification = [])
    {
        return new static($title, $message, $data, $priority, $sound, $notification);
    }
668723
def notification_message(self, title, content, icon=""):
        
        code = """
            var options = {
                body: "%(content)s",
                icon: "%(icon)s"
            }
            if (!("Notification" in window)) {
                alert("%(content)s");
            }else if (Notification.permission === "granted") {
                var notification = new Notification("%(title)s", options);
            }else if (Notification.permission !== 'denied') {
                Notification.requestPermission(function (permission) {
                    if (permission === "granted") {
                        var notification = new Notification("%(title)s", options);
                    }
                });
            }
        """ % {'title': title, 'content': content, 'icon': icon}
        self.execute_javascript(code)
185971
public final function log ($msg, $title = null)
    {
        if (is_null($title)) {
            $log = '  '.pack('c',0x1B)."[1m". $msg.pack('c',0x1B)."[0m".PHP_EOL;

        } else {
            $log = '  '.pack('c',0x1B)."[1;32m". $title.':'. pack('c',0x1B)."[0m".'  '.
                pack('c',0x1B)."[1m". $msg. pack('c',0x1B)."[0m".PHP_EOL;
        }

        echo $log;
    }
585336
function(title, message) {
            if (!message) {
                message = title;
                title = null;
            }

            return Dialogs.open(null, {
                "title": title,
                "message": message,
                "dialog": "confirm"
            });
        }
1277107
public function alert(string $message, array $context = []){
        if($this->logger !== null){
            $this->logger->alert($message, $context);
        }

        if($this->messagePanel !== null){
            $this->messagePanel->addMessage($message, LogLevel::ALERT);
        }
    }
294167
public function showSuccess($view, $message, $title = null)
    {
        return $this->show($view, 'success', $message, $title);
    }
839245
function (message, title, color) {
    /**
     * Container element for all of the messages created from init().
     */
    var tc = document.querySelector(".toast-container");
    if (!tc) {
        /**
         * If there's no container created from the init() function, throw an error.
         */
        throw new Error("toast-container is null.");
    }
    else {
        /**
         * Amount of time before each element is removed.
         */
        var timer_1 = 7;
        /**
         * Declare if the user's mouse is hovering over the message.
         */
        var isHovered_1 = false;
        /**
         * Create elements.
         */
        var toastEl_1 = document.createElement("div");
        var titleEl = document.createElement("h4");
        var messageEl = document.createElement("div");
        var loaderEl = document.createElement("div");
        var leftLoaderEl = document.createElement("div");
        var rightLoaderEl = document.createElement("div");
        var spinnerLoaderEl = document.createElement("div");
        /**
         * Fill contents.
         */
        titleEl.innerText = title;
        messageEl.innerText = message;
        /**
         * Add classes.
         */
        toastEl_1.classList.add("toast");
        toastEl_1.classList.add(color);
        titleEl.classList.add("toast-title");
        messageEl.classList.add("toast-message");
        loaderEl.classList.add("toast-loader");
        leftLoaderEl.classList.add("toast-loader-left");
        leftLoaderEl.classList.add(color);
        rightLoaderEl.classList.add("toast-loader-right");
        spinnerLoaderEl.classList.add("toast-loader-spinner");
        /**
         * Click (makes the message go away entirely).
         */
        toastEl_1.addEventListener("click", function (e) {
            e.currentTarget.classList.add("poof");
            setTimeout(function () {
                if (!tc) {
                    throw (Error("toast-container is null."));
                }
                else {
                    tc.removeChild(toastEl_1);
                    var index = messageQueue.indexOf(message);
                    messageQueue.splice(index, 1);
                }
            }, 200);
        });
        /**
         * MouseEnter (pauses the timer).
         */
        toastEl_1.addEventListener("mouseenter", function (e) {
            var children = e.currentTarget.children[2].children;
            for (var i = 0; i < children.length; i++) {
                children[i].style.animationPlayState = "paused";
            }
            isHovered_1 = true;
        });
        /**
         * MouseLeave (resumes the timer).
         */
        toastEl_1.addEventListener("mouseleave", function (e) {
            var children = e.currentTarget.children[2].children;
            for (var i = 0; i < children.length; i++) {
                children[i].style.animationPlayState = "running";
            }
            isHovered_1 = false;
        });
        /**
         * Append children.
         */
        loaderEl.appendChild(leftLoaderEl);
        loaderEl.appendChild(rightLoaderEl);
        loaderEl.appendChild(spinnerLoaderEl);
        toastEl_1.appendChild(titleEl);
        toastEl_1.appendChild(messageEl);
        toastEl_1.appendChild(loaderEl);
        tc.appendChild(toastEl_1);
        /**
         * Start timer.
         */
        var interval_1 = setInterval(function () {
            if (timer_1 <= 7) {
                toastEl_1.classList.add("active");
            }
            if (!isHovered_1 && timer_1 <= .800) {
                toastEl_1.classList.add("poof");
            }
            if (!isHovered_1) {
                timer_1 -= 0.100;
                if (timer_1 <= 0) {
                    clearInterval(interval_1);
                    if (toastEl_1 && toastEl_1.parentNode === tc) {
                        if (!tc) {
                            throw (Error("toast-container is null."));
                        }
                        else {
                            tc.removeChild(toastEl_1);
                            var index = messageQueue.indexOf(message);
                            messageQueue.splice(index, 1);
                        }
                    }
                }
            }
        }, 100);
    }
}