Add a notification to the subscriber.

@param $message
427118
protected function addNotification($message)
    {
        $event = new NotificationEvent();
        $event->setMessage($message);
        
        $this
            ->eventDispatcher
            ->dispatch(NotificationEvent::NAME, $event)
        ;
    }
892805
public function log($message)
    {
        $formattedMessage = $this->formatMessage($message);
        if (!empty($formattedMessage)) {
            $this->logger->info($formattedMessage);
        }
    }
92726
protected function sendSwiftMessage( $message )
	{
		Hooks::trigger( 'mailer.sending', compact( $message ) );

		try
		{
			$this->swift->send( $message, $this->failedRecipients );
		}
		finally
		{
			$this->swift->getTransport()->stop();
		}
	}
272366
public function notify($message, array $params = array())
    {
        try {
            $this->registerErrorHandler();

            if (is_string($message)) {
                $notification = new Notification();
                $notification->setMessage($message)
                    ->setLevel(Notification::LVL_INFO)
                    ->setCategory(Notification::BUSINESS);
            } else {
                $notification = $message;
            }

            $this->prepareNotification($notification, $params);

            if ($notification->getLevel() < $this->filterLevel) {
                $this->restoreErrorHandler();
                return false;
            }

            if ($this->includeBacktrace) {
                $notification->setBackTrace($this->getBackTrace());
            }

            $validator = new NotificationValidator();
            $validator->validate($notification);

            $errors = $validator->getErrors();
            if (!empty($errors)) {
                throw new \LogicException(
                    sprintf('Notification validator errors: %s', $validator->getErrorsAsString())
                );
            }

            $serialized = @json_encode($notification->toArray());
            if (!$serialized) {
                $this->restoreErrorHandler();
                return false;
            }

            $request = new RequestDescriptor();
            $request->addBodyParam('notification', $serialized);

            $request->setUrl($this->buildUrl('/api/notifications'));
            $request->setMethod('POST');

            $return = $this->send($request, ApiRequestOption::NO_RESPONSE);

            $this->restoreErrorHandler();

            return $return;
        } catch (\Exception $e) {
            $this->writeToExceptionLogFile($e->getMessage());
            $this->restoreErrorHandler();
        }

        return false;
    }
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);
        }
    }
165140
protected function sendSwiftMessage($message)
    {
        if ($this->events) {
            $this->events->dispatch('mailer.sending', array($message));
        }

        if (! $this->pretending) {
            try {
                $this->swift->send($message, $this->failedRecipients);
            }
            finally {
                $this->swift->getTransport()->stop();
            }
        }

        // In the pretending mode.
        else if (isset($this->logger)) {
            $this->logMessage($message);
        }
    }
1159001
public function notice($message, array $context = [])
    {
        $this->checkInitialized();

        foreach ($this->loggers as $logger) {
            $logger->notice($message, $context);
        }
    }
62449
public function logNotice($message)
    {
        if (func_num_args() > 1) {
            $message = $this->_prepareLogMessage(func_get_args());
        }

        return $this->_log(Zend_Log::NOTICE, $message);
    }
333666
public function notify_success($message) {
        $n = new \core\output\notification($message, \core\output\notification::NOTIFY_SUCCESS);
        return $this->render($n);
    }
106844
public function userMessage($message, $context = [])
    {
        if (isset($this->app) && $this->app instanceof \atk4\core\AppUserNotificationInterface) {
            $this->app->userNotification($message, $context);
        } elseif (isset($this->app) && $this->app instanceof \Psr\Log\LoggerInterface) {
            $this->app->log('warning', 'Could not notify user about: '.$message, $context);
        } else {
            $this->_echo_stderr("Could not notify user about: $message\n");
        }

        return $this;
    }
195948
public function addMessage(string $message)
  {
    if ( false === ($step=$this->currentStep()) ){
      throw new \Exception('No current step');
    }
    
    $step->addMessage($message);
    return $this;
  }
1190194
public function warning($message): void
	{
		$message = $this->logMessToArray($message);
		$this->log(array_merge(['SEVERITY' => 'WARNING'], $message));
	}
349450
public function addNotice($message, array $context = array())
    {
        return $this->_instance->addRecord(\Monolog\Logger::NOTICE, $message, $context);
    }
132613
public function addMessageNow($key, $message)
    {
        // Create Array for this key
        if (!isset($this->forNow[$key])) {
            $this->forNow[$key] = [];
        }

        // Push onto the array
        $this->forNow[$key][] = $message;
    }
453942
public function addMessage($message)
    {
        collect((array) $message)->each(function ($item) {
            collect($item)->flatten()->each(function ($flattened) {
                $this->messageList->push($flattened);
            });
        });
    }
580083
public function addMessageToQueue($message, $queue)
    {
        $this->queue->sendMessage([
            'QueueUrl' => $this->getQueueURL($queue),
            'MessageBody' => $message,
        ]);
    }
1199878
public function publish($channel, $message)
    {
        foreach ($this->getSubscribersForChannel($channel) as $handler) {
            call_user_func($handler, $message);
        }
    }