You are here

public function UnmetDependenciesException::getTranslatedMessage in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/UnmetDependenciesException.php \Drupal\Core\Config\UnmetDependenciesException::getTranslatedMessage()
  2. 10 core/lib/Drupal/Core/Config/UnmetDependenciesException.php \Drupal\Core\Config\UnmetDependenciesException::getTranslatedMessage()

Gets a translated message from the exception.

Parameters

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

Return value

string

File

core/lib/Drupal/Core/Config/UnmetDependenciesException.php, line 70

Class

UnmetDependenciesException
An exception thrown if configuration has unmet dependencies.

Namespace

Drupal\Core\Config

Code

public function getTranslatedMessage(TranslationInterface $string_translation, $extension) {
  return $string_translation
    ->translate('Unable to install %extension due to unmet dependencies: %config_names', [
    '%config_names' => static::formatConfigObjectList($this->configObjects),
    '%extension' => $extension,
  ]);
}