Show a message about database alteration

@param string $message to display
@param string $type one of [created|changed|repaired|obsolete|deleted|error]
332083
public function alterationMessage($message, $type = "")
    {
        if (!$this->supressOutput) {
            if (Director::is_cli()) {
                switch ($type) {
                    case "created":
                    case "changed":
                    case "repaired":
                        $sign = "+";
                        break;
                    case "obsolete":
                    case "deleted":
                        $sign = '-';
                        break;
                    case "notice":
                        $sign = '*';
                        break;
                    case "error":
                        $sign = "!";
                        break;
                    default:
                        $sign = " ";
                }
                $message = strip_tags($message);
                echo "  $sign $message\n";
            } else {
                switch ($type) {
                    case "created":
                        $class = "success";
                        break;
                    case "obsolete":
                        $class = "error";
                        break;
                    case "notice":
                        $class = "warning";
                        break;
                    case "error":
                        $class = "error";
                        break;
                    case "deleted":
                        $class = "error";
                        break;
                    case "changed":
                        $class = "info";
                        break;
                    case "repaired":
                        $class = "info";
                        break;
                    default:
                        $class = "";
                }
                echo "<li class=\"$class\">$message</li>";
            }
        }
    }
156793
private function _msg($message, $rule_type)
    {
        if (is_string($message)) {
            return $message;
        } elseif (isset($message[$rule_type])) {
            return $message[$rule_type];
        } else {
            return 'INVALID';
        }
    }
1242953
public function set($type, $message)
    {

        $type = in_array($type, $this->types) ? $type : self::TYPE_INFO;

        self::$messages[$type][] = $message;
        $this->sessionDriver->set('_messages_', self::$messages);
        return $this;
    }
284102
public function render($message, $type = 'info', $dismissable = false)
    {
        if ($dismissable) {
            $message .= $this->renderCloseButton();
        }

        return parent::render($message, $type);
    }
167546
private function addSessionFlashBagMessage($message, $type = Bootstrap4::STATE_SUCCESS, $translationDomain = null)
    {
        if (false !== $translationDomain) {
            $message = $this->getTranslator()->trans($message, [], $translationDomain);
        }

        $this->getSession()->getFlashBag()->add($type, $message);
    }
612239
public function message($type, $message)
    {
        if (isset($this->cssClasses[$type])) {
            $html = '<div class="%s">%s</div>';
            $this->messages[] = sprintf($html, $this->cssClasses[$type], $message);
            $this->session->set($this->flashKey, $this->messages);
        }
    }
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;
    }
63570
public function message($message = '', $type = 'info')
    {
        if (is_array($message)) {
            foreach ($message as $issue) {
                $this->addMessage($issue, $type);
            }

            return $this;
        }

        return $this->addMessage($message, $type);
    }
920973
function log($message, $type = null, $explicit = false) {
		try {
			$time = date('Y-m-d|H:i:s');
			if ($type === null) {
				$this->appendToFile(date('Y/m/d'), "[$time] $message", $explicit);
			}
			else { // type !== null
				$this->appendToFile($type, "[$time] $message", $explicit);
			}
		}
		catch (\Exception $e) {
			$this->failedLogging($e, $message);
		}
	}
320273
public static function addMessage($message, $type = 'default')
    {
        if (is_array($message)) {
            foreach ($message as $msg) {
                static::addMessage($msg);
            }

            return;
        }

        try {
            $collector = static::getInstance();
        } catch (\UnexpectedValueException $e) {
            return;
        }

        $data = $collector['debug.messages'];

        if ($data === null) {
            $data = [];
        }

        $data[] = [
            'message' => $message,
            'type' => $type,
            'timestamp' => microtime(true),
        ];

        $collector['debug.messages'] = $data;
    }
1186228
public function enqueueMessage($msg, $type = 'message')
	{
		if ($this->messageStatus) {
			$event = new Event('onApplicationEnqueueMessage');
			$event->addArgument('message', $msg);
			$event->addArgument('type', $type);
			Factory::getDispatcher()->triggerEvent($event);
		}
	}
885114
public function flash($message = null, $type = null) {
		if ($message !== null) $this->attributes['message'] = (array) $message;
		if ($type !== null) $this->attributes['type'] = $type;

		$this->session->flash('notifier', $this->attributes);
	}
12494
public function addError($message, ...$text): void
    {
        $this->add(self::TYPE_ERROR, $message, ...$text);
    }
282027
public function triggerError($message, $message_type = E_USER_NOTICE) {
    $trace = debug_backtrace();
    trigger_error($message . ' in ' . $trace[0]['file'] . ' on line ' .
      $trace[0]['line'], $message_type);
  }
30563
protected function trigger_error( $code, $message, $type = E_USER_NOTICE ){
		$trace = debug_backtrace();
		$Err = PLUG::raise_error( $code, $message, $type, $trace );
		$this->on_trigger_error( $Err );
	}
517475
public function setMessage($type, $message)
    {
        if (!is_null($message)) {
            $this->messages[] = [
                'message' => $message,
                'type'    => $type,
            ];
        }

        return $this;
    }
1237572
protected function addFlash(string $type, $message): void
    {
        (new Session())->getFlashBag()->set($type, $message);
    }