Output a success notification.

@param string $message the message to print out
@return string HTML fragment.
@see \core\output\notification
333666
public function notify_success($message) {
        $n = new \core\output\notification($message, \core\output\notification::NOTIFY_SUCCESS);
        return $this->render($n);
    }
1143826
public function success(string $message, string $title = '', array $options = []): self
    {
        return $this->addNotification(self::SUCCESS, $message, $title, $options);
    }
917697
protected function output($message, $color = null)
    {
        $format = [];
        if (!$this->isMuted()) {
            if ($color !== null) {
                $format[] = $color;
            }
            echo Console::ansiFormat("\r".$message."\n", $format);
        }
    }
147604
public function info($message)
    {
        $this->message = $message;
        $this->type = 'info';
        $this->title = 'Notice';
        $this->icon = 'sl sl-icon-info info ln-notify-icon';

        return $this->setNotifier();
    }
573415
protected function view_savegrading_result($message) {
        $o = '';
        $o .= $this->get_renderer()->render(new assign_header($this->get_instance(),
                                                      $this->get_context(),
                                                      $this->show_intro(),
                                                      $this->get_course_module()->id,
                                                      get_string('savegradingresult', 'assign')));
        $gradingresult = new assign_gradingmessage(get_string('savegradingresult', 'assign'),
                                                   $message,
                                                   $this->get_course_module()->id);
        $o .= $this->get_renderer()->render($gradingresult);
        $o .= $this->view_footer();
        return $o;
    }
1226122
public static function padMessage($message)
    {
        $messageLen = strlen($message);
        $padLen = self::MAX_MESSAGE_LENGTH - $messageLen;

        return pack('n*', $padLen).str_pad($message, $padLen + $messageLen, chr(0), STR_PAD_LEFT);
    }
127594
public static function html($message, $data = null)
    {
        if (!static::$on) {
            return;
        }

        echo "<hr>";
        echo "<i>";
            static::indent();
            echo "<b>" . static::getTime() . " - " . $message . "</b>";
            if (is_array($data)) {
                Html::print_r($data);
            } elseif ($data) {
                static::indent();
                echo "&nbsp;&nbsp;&nbsp;&nbsp;" . $data . "<br>";
            }
        echo "</i>";
    }
1214652
public function outputHTML($message, $context = [])
    {
        $message = preg_replace_callback('/{([a-z0-9_-]+)}/i', function ($match) use ($context) {
            if (isset($context[$match[1]]) && is_string($context[$match[1]])) {
                return $context[$match[1]];
            }

            // don't change the original message
            return '{'.$match[1].'}';
        }, $message);

        $this->_output_bypass = true;
        $this->sse->send($this->js()->append($message.'<br/>'));
        $this->_output_bypass = false;

        return $this;
    }
755331
final public static function outputAsNotice(string $message, string $exit = "yes")
    {
        $colors = self::getManagerColorInstance();
        echo "\n\n".$colors->getColoredString($message, "yellow", "transparent");
        if ($exit == "yes") {
            exit();
        }
    }
1315814
public static function createMessage(string $message): string
    {
        $lastErrorMessage = error_get_last();
        if ($lastErrorMessage !== null) {
            $message .= "; ".$lastErrorMessage["message"];
        }
        return $message;
    }
674196
public static function output($message, $color = null)
    {
        if (is_string($color)) {
            $message = sprintf($color, $message);
        }

        if (is_null(self::$map)) {
            self::setMap();
        }

        call_user_func(self::$map, $message);
    }
170960
protected function prefixMessage($message) {
        if ($this->prefix !== null) {
            return s('%s: %s', $this->prefix, $message);
        }

        return $message;
    }
1199025
public function getNotifierForMessage(Message $message): Notifier
    {
        foreach ($this->notifiers as $notifier) {
            if ($notifier->handles($message)) {
                return $notifier;
            }
        }
        throw new NotifierNotFoundException();
    }
773890
public function notice($message)
    {
        $args = func_get_args();
        array_shift($args);
        return $this->log(Log::Notice, $message, $args);
    }
49925
public function format(string $message): string
    {
        if (null === $this->params) {
            return $message;
        }

        foreach ($this->transformParams($this->params) as $key => $value) {
            $message = str_replace($key, $value, $message);
        }

        return $message;
    }
636001
public void displaySuccess(final String message) {
        notificationMessage.showNotification(SPUIStyleDefinitions.SP_NOTIFICATION_SUCCESS_MESSAGE_STYLE, null, message,
                true);
    }
928325
public function sendMessage($message)
    {
        $message = sprintf("%s\r\n", $message);
        fwrite($this->getSocketStream(), $message, strlen($message));
        return $this->receiveMessage();
    }