Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
drupal
Merge requests
!4604
Issue
#2313309
: Admin toolbar and contextual links should always be rendered in the admin language (if set)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#2313309
: Admin toolbar and contextual links should always be rendered in the admin language (if set)
issue/drupal-2313309:2313309-11.x
into
11.x
Overview
22
Commits
24
Pipelines
22
Changes
20
Open
Dieter Holvoet
requested to merge
issue/drupal-2313309:2313309-11.x
into
11.x
1 year ago
Overview
10
Commits
24
Pipelines
22
Changes
20
Expand
0
0
Merge request reports
Compare
11.x
version 22
cb25968f
1 month ago
version 21
25f0dcec
1 month ago
version 20
f041ff04
2 months ago
version 19
b4380b13
2 months ago
version 18
af5b7643
2 months ago
version 17
b961a94f
7 months ago
version 16
afb11ced
7 months ago
version 15
8fe4dc4f
7 months ago
version 14
76a62d90
7 months ago
version 13
138ac1aa
10 months ago
version 12
d046f509
10 months ago
version 11
98d98435
10 months ago
version 10
4446bb4e
10 months ago
version 9
9b98cb2f
10 months ago
version 8
95aa7ade
10 months ago
version 7
4f2e0713
10 months ago
version 6
88b2247a
10 months ago
version 5
27715660
10 months ago
version 4
88fe874e
10 months ago
version 3
e28c7b8d
1 year ago
version 2
06474cff
1 year ago
version 1
7975cb1f
1 year ago
11.x (HEAD)
and
latest version
latest version
48f57e9e
24 commits,
1 month ago
version 22
cb25968f
23 commits,
1 month ago
version 21
25f0dcec
22 commits,
1 month ago
version 20
f041ff04
18 commits,
2 months ago
version 19
b4380b13
17 commits,
2 months ago
version 18
af5b7643
16 commits,
2 months ago
version 17
b961a94f
15 commits,
7 months ago
version 16
afb11ced
14 commits,
7 months ago
version 15
8fe4dc4f
14 commits,
7 months ago
version 14
76a62d90
13 commits,
7 months ago
version 13
138ac1aa
12 commits,
10 months ago
version 12
d046f509
11 commits,
10 months ago
version 11
98d98435
10 commits,
10 months ago
version 10
4446bb4e
9 commits,
10 months ago
version 9
9b98cb2f
8 commits,
10 months ago
version 8
95aa7ade
7 commits,
10 months ago
version 7
4f2e0713
6 commits,
10 months ago
version 6
88b2247a
5 commits,
10 months ago
version 5
27715660
4 commits,
10 months ago
version 4
88fe874e
3 commits,
10 months ago
version 3
e28c7b8d
7 commits,
1 year ago
version 2
06474cff
6 commits,
1 year ago
version 1
7975cb1f
2 commits,
1 year ago
20 files
+
467
−
57
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
20
Search (e.g. *.vue) (Ctrl+P)
core/lib/Drupal/Core/Cache/Context/AccountAdminLanguageCacheContext.php
0 → 100644
+
44
−
0
Options
<?php
namespace
Drupal\Core\Cache\Context
;
use
Drupal\Core\Cache\CacheableMetadata
;
use
Drupal\Core\Session\AccountProxyInterface
;
/**
* Defines an AdminLanguageCacheContext service, for "admin language" caching.
*
* Cache context ID: 'user.admin_language'.
*/
class
AccountAdminLanguageCacheContext
implements
CacheContextInterface
{
/**
* Constructs a new AccountAdminLanguageCacheContext service.
*
* @param \Drupal\Core\Session\AccountProxyInterface $currentUser
* The current user.
*/
public
function
__construct
(
protected
AccountProxyInterface
$currentUser
)
{}
/**
* {@inheritdoc}
*/
public
static
function
getLabel
():
string
{
return
t
(
"Account's administration language"
);
}
/**
* {@inheritdoc}
*/
public
function
getContext
():
string
{
return
$this
->
currentUser
->
getPreferredAdminLangcode
();
}
/**
* {@inheritdoc}
*/
public
function
getCacheableMetadata
():
CacheableMetadata
{
return
new
CacheableMetadata
();
}
}
Loading