Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
6efce429
Commit
6efce429
authored
Nov 03, 2015
by
alexpott
Browse files
Issue
#2581817
by YesCT: Follow-up for
#2505263
: clean up comments
parent
e55daa30
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationSession.php
View file @
6efce429
...
...
@@ -144,9 +144,9 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) {
foreach
(
$this
->
languageManager
->
getNativeLanguages
()
as
$language
)
{
$langcode
=
$language
->
getId
();
$links
[
$langcode
]
=
array
(
// We need to clone the $url object to avoid using the same one for all
links.
// When the links are rendered, options are set on the $url
object,
// so if we use the same one, they would be set for all links.
// We need to clone the $url object to avoid using the same one for all
//
links.
When the links are rendered, options are set on the $url
//
object,
so if we use the same one, they would be set for all links.
'url'
=>
clone
$url
,
'title'
=>
$language
->
getName
(),
'attributes'
=>
array
(
'class'
=>
array
(
'language-link'
)),
...
...
core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php
View file @
6efce429
...
...
@@ -200,9 +200,9 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) {
foreach
(
$this
->
languageManager
->
getNativeLanguages
()
as
$language
)
{
$links
[
$language
->
getId
()]
=
array
(
// We need to clone the $url object to avoid using the same one for all
links.
// When the links are rendered, options are set on the $url
object,
// so if we use the same one, they would be set for all links.
// We need to clone the $url object to avoid using the same one for all
//
links.
When the links are rendered, options are set on the $url
//
object,
so if we use the same one, they would be set for all links.
'url'
=>
clone
$url
,
'title'
=>
$language
->
getName
(),
'language'
=>
$language
,
...
...
core/modules/language/src/Tests/LanguageSwitchingTest.php
View file @
6efce429
...
...
@@ -394,9 +394,9 @@ protected function doTestLanguageLinkActiveClassAnonymous() {
}
/**
* Test language switcher links for session based negotiation.
* Test
s
language switcher links for session based negotiation.
*/
function
testLanguageSessionSwitchLinks
()
{
public
function
testLanguageSessionSwitchLinks
()
{
// Add language.
$edit
=
array
(
'predefined_langcode'
=>
'fr'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment