UnmetDependenciesException::getTranslatedMessage

public UnmetDependenciesException::getTranslatedMessage(TranslationInterface $string_translation, $extension)

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 55

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,
  ]
  );
}
doc_Drupal
2016-10-29 09:50:26
Comments
Leave a Comment

Please login to continue.