Skip to content
Snippets Groups Projects
Commit 7424e462 authored by catch's avatar catch
Browse files

Issue #2276571 by alexpott: Fixed Use StringTranslationTrait in ConfigManager.

parent 8d03d21b
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
use Drupal\Core\Config\Entity\ConfigDependencyManager;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationManager;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
......@@ -18,6 +19,7 @@
* The ConfigManager provides helper functions for the configuration system.
*/
class ConfigManager implements ConfigManagerInterface {
use StringTranslationTrait;
/**
* The entity manager.
......@@ -40,13 +42,6 @@ class ConfigManager implements ConfigManagerInterface {
*/
protected $typedConfigManager;
/**
* The string translation service.
*
* @var \Drupal\Core\StringTranslation\TranslationManager
*/
protected $stringTranslation;
/**
* The active configuration storage.
*
......@@ -148,11 +143,11 @@ public function diff(StorageInterface $source_storage, StorageInterface $target_
// Check for new or removed files.
if ($source_data === array('false')) {
// Added file.
$source_data = array($this->stringTranslation->translate('File added'));
$source_data = array($this->t('File added'));
}
if ($target_data === array('false')) {
// Deleted file.
$target_data = array($this->stringTranslation->translate('File removed'));
$target_data = array($this->t('File removed'));
}
return new \Diff($source_data, $target_data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment