You are here

protected function TranslatorResult::__construct in Translation Management Tool 8

Constructs a result object.

Parameters

bool $success: Whether or not the check was successful.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $reason: The reason in case of an unsuccessful check.

File

src/Translator/TranslatorResult.php, line 34

Class

TranslatorResult
Used by translator to return the boolean result of a check with a reason.

Namespace

Drupal\tmgmt\Translator

Code

protected function __construct($success, TranslatableMarkup $reason = NULL) {
  $this->success = $success;
  $this->message = $reason;
}