Get's the success message and replaces the placeholders with the new objects values
@return string
767290
public function EditingSuccessContent() {
		if ($object = $this->editObject) {
			$message = $this->Data()->EditingSuccessMessage;
			$message = str_replace('$Title', $object->Title, $message);
			$message = str_replace('$Link', $object->Link('?stage=Stage'), $message);
			return $message;
		}
	}
46013
public function updateResult()
    {
        $output = $this->session()->get('dbupdate_result', []);

        $context = [
            'changes' => $output,
            'check'   => null,
            'debug'   => false,
            'alters'  => null,
            'creates' => null,
            'diffs'   => null,
        ];

        return $this->render('@bolt/dbcheck/dbcheck.twig', $context);
    }
1223993
public function getMessage()
    {
        $result = $this->message;
        if ($result === '') {
            switch ($this->state) {
                case self::STATE_PASSED:
                case self::STATE_SKIPPED:
                    break;
                case self::STATE_WARNING:
                    $result = t('The installation precondition passed with warnings.');
                    break;
                case self::STATE_FAILED:
                default:
                    $result = t('The installation precondition failed.');
                    break;
            }
        }

        return $result;
    }
75892
protected function replaceKeyPlaceholders()
    {
        if ( ! $this->model) {
            return $this;
        }

        $placeholder = static::MODEL_KEY_PLACEHOLDER;

        foreach ($this->rules as $key => &$ruleSet) {

            if (is_string($ruleSet)) {

                $ruleSet = str_replace($placeholder, $this->model->getKey(), $ruleSet);
                continue;
            }

            if (is_array($ruleSet)) {

                foreach ($ruleSet as &$rule) {
                    $rule = str_replace($placeholder, $this->model->getKey(), $rule);
                }

                unset($rule);
            }
        }

        unset($ruleSet);

        return $this;
    }
1027431
protected function injectResultInResponse()
    {
        $validationName = $this->validation instanceof Validation
            ? $this->validation->getName()
            : 'default';

        $validationResult = MessageService::get()->sanitizeValidatorResult($this->result, $validationName);

        $result = [
            'success'  => !$this->result->hasErrors(),
            'data'     => $this->result->getData(),
            'messages' => [
                'errors'   => $this->formatMessages($validationResult->getErrors()),
                'warnings' => $this->formatMessages($validationResult->getWarnings()),
                'notices'  => $this->formatMessages($validationResult->getNotices())
            ]
        ];

        $this->setUpResponseResult($result);
    }
1285260
public function getMessage()
    {
        if ($this->success) {
            return null;
        }
        $message = $this->getPotentialMessage();
        $message->setVariables(
            array(
                'value' => $this->value
            )
        );

        return $message;
    }
744238
public function getFailureMessage()
    {
        $message = '';
        if ($this->isFound === false && $this->isReadable === false) {
            $message  = 'Configuration file';
            if ($this->filename) {
                $message  .= ' "%s"';
            }

            $message .= ' was not found. ';
            $message .= 'Please provide the correct path or all settings via command options.';

        } elseif ($this->isFound === true && $this->isReadable === false) {
            $message  = 'Configuration file "%s" was found, but is not readable. ';
            $message .= 'Please change ownerships or all settings via command options.';
        }

        $message = sprintf($message, $this->filename);

        return $message;
    }
695640
public function getMessage()
    {
        $message = null;

        if (isset($this->data->transactionResponse->messages)) {
            // In case of a successful transaction, a "messages" element is present
            $message = (string)$this->data->transactionResponse->messages->message->description;
        } elseif (isset($this->data->transactionResponse->errors)) {
            // In case of an unsuccessful transaction, an "errors" element is present
            $message = (string)$this->data->transactionResponse->errors->error->errorText;
        } elseif (isset($this->data->messages->message)) {
            // In case of invalid request, the top-level message provides details.
            $message = (string)$this->data->messages->message->text;
        }

        return $message;
    }
785810
public function getFailureMessage()
    {
        if (!$this->pdoVersion && !$this->pdoMySqlVersion) {
            $message = 'PHP-Extensions "PDO" and "pdo_mysql" are not installed. Please install both.';

        } elseif ($this->pdoVersion && !$this->pdoMySqlVersion) {
            $message = 'PHP-Extension "PDO" (v%s) is installed, but "pdo_mysql" not. Please install it.';
            $message = sprintf($message, $this->pdoVersion);
        }

        return $message;
    }
347127
public function getResultForMultiStatus()
    {
        $r = [
            200 => [],
            404 => [],
        ];
        foreach ($this->result as $propertyName => $info) {
            if (!isset($r[$info[0]])) {
                $r[$info[0]] = [$propertyName => $info[1]];
            } else {
                $r[$info[0]][$propertyName] = $info[1];
            }
        }
        // Removing the 404's for multi-status requests.
        if (self::ALLPROPS === $this->requestType) {
            unset($r[404]);
        }

        return $r;
    }
1059189
public function buildMessage()
    {
        if (!empty($this->message)) {
            return $this->message;
        }

        foreach ($this->texts as $text) {
            $this->message[] = [
                'type' => MessageType::TEXT,
                'text' => $text,
            ];
        }

        if ($this->quickReply) {
            $lastKey = count($this->message) - 1;

            // If the user receives multiple message objects.
            // The quickReply property of the last message object is displayed.
            $this->message[$lastKey]['quickReply'] = $this->quickReply->buildQuickReply();
        }

        return $this->message;
    }
1352307
protected function _getFieldsAndPlaceholders()
    {
        $fields = $this->_sql->getFields();
        $parts = [];
        foreach ($fields as $field) {
            $parts[] = "{$field} = :{$field}";
        }
        return implode(', ', $parts);
    }
144872
public function getFormattedMessageBody()
    {
        $msgBody = $this->getMessageBody();
        $txt = Loader::helper('text');

        $repliedPos = strpos($msgBody, $this->getMessageDelimiter());
        if ($repliedPos > -1) {
            $repliedText = substr($msgBody, $repliedPos);
            $messageText = substr($msgBody, 0, $repliedPos);
            $msgBody = $messageText . '<div class="ccm-profile-message-replied">' . nl2br($txt->entities($repliedText)) . '</div>';
            $msgBody = str_replace($this->getMessageDelimiter(), '<hr />', $msgBody);
        } else {
            $msgBody = nl2br($txt->entities($msgBody));
        }

        return $msgBody;
    }
750615
public function getSuccessMessage()
    {
        $message = 'Connection to Gerrit "%s" (v%s) via %s-DataService was successful and works as expected.';
        $message = sprintf($message, $this->dataService->getHost(), $this->version, $this->dataService->getName());

        return $message;
    }
1332689
public function message()
    {
        $messages = [];
        foreach($this->values as $key => $value) {
            if ($value->fails()) {
                $messages[$key] = $value->message();
            }
        }
        return $messages;
    }
262024
public function toMessage()
    {
        $m = new Message(array(
            $this->getRequestId(),
            $this->getActionName(),
        ));
        $m->append($this->getParameters());

        return $m;
    }
222166
public function errorMessage()
	{
		if ($this->decoded() === null) {
			throw new \RuntimeException('No result from server.');
		}

		$decoded = $this->decoded();
		if (isset($decoded->error))
			return sprintf('%s (%s)', $decoded->error->message, $decoded->error->code);

		$message = sprintf('%s (%s)', $decoded->message, $this->statusCode());

		if (isset($this->decoded()->errors)) {
			$errors = $this->decoded()->errors;

			$message .= $this->resolveAttributes($errors);
		}

		return $message;
	}