Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3174996
Commits
7424e462
Commit
7424e462
authored
10 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2276571
by alexpott: Fixed Use StringTranslationTrait in ConfigManager.
parent
8d03d21b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/lib/Drupal/Core/Config/ConfigManager.php
+4
-9
4 additions, 9 deletions
core/lib/Drupal/Core/Config/ConfigManager.php
with
4 additions
and
9 deletions
core/lib/Drupal/Core/Config/ConfigManager.php
+
4
−
9
View file @
7424e462
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment