diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php index e7d6a2f..dd793cc 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallConfirmForm.php @@ -63,7 +63,7 @@ class ModulesUninstallConfirmForm extends ConfirmFormBase implements ControllerI public static function create(ContainerInterface $container) { return new static( $container->get('module_handler'), - $container->get('keyvalue.expirable'), + $container->get('keyvalue.expirable')->get('modules_uninstall'), $container->get('string_translation') ); } @@ -73,14 +73,14 @@ public static function create(ContainerInterface $container) { * * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. - * @param \Drupal\Core\KeyValueStore\KeyValueExpirableFactory $key_value_expirable_factory + * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable * The key value expirable factory. * @param \Drupal\Core\StringTranslation\TranslationManager * The translation manager. */ - public function __construct(ModuleHandlerInterface $module_handler, KeyValueExpirableFactory $key_value_expirable_factory, TranslationManager $translation_manager) { + public function __construct(ModuleHandlerInterface $module_handler, KeyValueStoreExpirableInterface $key_value_expirable, TranslationManager $translation_manager) { $this->moduleHandler = $module_handler; - $this->keyValueExpirable = $key_value_expirable_factory->get('modules_uninstall'); + $this->keyValueExpirable = $key_value_expirable; $this->translationManager = $translation_manager; } @@ -158,7 +158,7 @@ public function submitForm(array &$form, array &$form_state) { // Uninstall the modules. $this->moduleHandler->uninstall($this->modules); - drupal_set_message(t('The selected modules have been uninstalled.')); + drupal_set_message($this->translationManager->translate('The selected modules have been uninstalled.')); $form_state['redirect'] = 'admin/modules/uninstall'; } diff --git a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php index 376f1dd..4939663 100644 --- a/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ModulesUninstallForm.php @@ -55,7 +55,7 @@ class ModulesUninstallForm implements FormInterface, ControllerInterface { public static function create(ContainerInterface $container) { return new static( $container->get('module_handler'), - $container->get('keyvalue.expirable'), + $container->get('keyvalue.expirable')->get('modules_uninstall'), $container->get('string_translation') ); } @@ -65,14 +65,14 @@ public static function create(ContainerInterface $container) { * * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. - * @param \Drupal\Core\KeyValueStore\KeyValueExpirableFactory $key_value_expirable_factory + * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $key_value_expirable * The key value expirable factory. * @param \Drupal\Core\StringTranslation\TranslationManager $translation_manager * The translation manager. */ - public function __construct(ModuleHandlerInterface $module_handler, KeyValueExpirableFactory $key_value_expirable_factory, TranslationManager $translation_manager) { + public function __construct(ModuleHandlerInterface $module_handler, KeyValueStoreExpirableInterface $key_value_expirable, TranslationManager $translation_manager) { $this->moduleHandler = $module_handler; - $this->keyValueExpirable = $key_value_expirable_factory->get('modules_uninstall'); + $this->keyValueExpirable = $key_value_expirable; $this->translationManager = $translation_manager; }