ValidationError.php in Backup and Migrate 5.0.x
File
src/Core/Config/ValidationError.php
View source
<?php
namespace Drupal\backup_migrate\Core\Config;
class ValidationError implements ValidationErrorInterface {
protected $fieldKey = '';
protected $message = '';
protected $replacement = [];
public function __construct($field_key, $message, array $replacement = []) {
$this->fieldKey = $field_key;
$this->message = $message;
$this->replacement = $replacement;
}
public function getMessage() {
return $this->message;
}
public function getReplacement() {
return $this->replacement;
}
public function getFieldKey() {
return $this->fieldKey;
}
public function __toString() {
return strtr($this
->getMessage(), $this
->getReplacement());
}
}