protected function SchemaMigrator::logMessageInterpolate in Schema 8
Interpolates context values into the message placeholders.
2 calls to SchemaMigrator::logMessageInterpolate()
- SchemaMigrator::logError in src/
Migration/ SchemaMigrator.php - SchemaMigrator::logSuccess in src/
Migration/ SchemaMigrator.php
File
- src/
Migration/ SchemaMigrator.php, line 119 - Contains Drupal\schema\Migration\SchemaMigrator.
Class
- SchemaMigrator
- Modifies the database schema to match the declared schema.
Namespace
Drupal\schema\MigrationCode
protected function logMessageInterpolate($message, array $context = array()) {
// build a replacement array with braces around the context keys
$replace = array();
foreach ($context as $key => $val) {
$replace['{' . $key . '}'] = $val;
}
// interpolate replacement values into the message and return
return strtr($message, $replace);
}