public function UnmetDependenciesException::getTranslatedMessage in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Config/UnmetDependenciesException.php \Drupal\Core\Config\UnmetDependenciesException::getTranslatedMessage()
- 9 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\ConfigCode
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,
]);
}