function LogMessageParserInterface::parseMessagePlaceholders
Same name in other branches
- 9 core/lib/Drupal/Core/Logger/LogMessageParserInterface.php \Drupal\Core\Logger\LogMessageParserInterface::parseMessagePlaceholders()
- 8.9.x core/lib/Drupal/Core/Logger/LogMessageParserInterface.php \Drupal\Core\Logger\LogMessageParserInterface::parseMessagePlaceholders()
- 10 core/lib/Drupal/Core/Logger/LogMessageParserInterface.php \Drupal\Core\Logger\LogMessageParserInterface::parseMessagePlaceholders()
Parses and transforms message and its placeholders to a common format.
For a value to be considered as a placeholder should be in the following formats:
- The PSR3 format
- The Drupal specific string placeholder format, described in \Drupal\Component\Render\FormattableMarkup
Values in PSR3 format will be transformed to \Drupal\Component\Render\FormattableMarkup format.
Parameters
string $message: The message that contains the placeholders. If the message is in PSR3 style, it will be transformed to \Drupal\Component\Render\FormattableMarkup style.
array $context: An array that may or may not contain placeholder variables.
Return value
array An array of the extracted message placeholders.
See also
\Drupal\Component\Render\FormattableMarkup
1 method overrides LogMessageParserInterface::parseMessagePlaceholders()
- LogMessageParser::parseMessagePlaceholders in core/
lib/ Drupal/ Core/ Logger/ LogMessageParser.php
File
-
core/
lib/ Drupal/ Core/ Logger/ LogMessageParserInterface.php, line 34
Class
- LogMessageParserInterface
- Defines an interface for parsing log messages and their placeholders.
Namespace
Drupal\Core\LoggerCode
public function parseMessagePlaceholders(&$message, array &$context);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.