You are here

public function UnmetDependenciesException::getTranslatedMessage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 60
Contains \Drupal\Core\Config\UnmetDependenciesException.

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
    ->formatPlural(count($this
    ->getConfigObjects()), 'Unable to install @extension, %config_names has unmet dependencies.', 'Unable to install @extension, %config_names have unmet dependencies.', [
    '%config_names' => implode(', ', $this
      ->getConfigObjects()),
    '@extension' => $extension,
  ]);
}