public function LogMessage::getText in File Log 8
Same name and namespace in other branches
- 2.0.x src/LogMessage.php \Drupal\filelog\LogMessage::getText()
Get the rendered text of the message.
Return value
string The rendered text.
File
- src/
LogMessage.php, line 160
Class
- LogMessage
- Represents a single log event.
Namespace
Drupal\filelogCode
public function getText() : string {
if (!$this->text) {
$this->text = $this->message;
if (!empty($this->placeholders)) {
$this->text = strtr($this->text, $this->placeholders);
}
$this->text = str_replace("\n", '\\n', strip_tags($this->text));
}
return $this->text;
}