function UnmetDependenciesException::getTranslatedMessage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/UnmetDependenciesException.php \Drupal\Core\Config\UnmetDependenciesException::getTranslatedMessage()
  2. 8.9.x core/lib/Drupal/Core/Config/UnmetDependenciesException.php \Drupal\Core\Config\UnmetDependenciesException::getTranslatedMessage()
  3. 11.x 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.

string $extension: The name of the extension that is being installed.

Return value

string

File

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

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,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.