Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etracker
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
etracker
Commits
9fa42b04
Commit
9fa42b04
authored
4 months ago
by
Julian Pustkuchen
Committed by
Sven Schüring
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3327407
: Remove usage of "$config->get('etracker_multilingual')" in array context
parent
95886565
No related branches found
No related tags found
1 merge request
!41
Issue #3327407: Remove usage of "$config->get('etracker_multilingual')" in array context
Pipeline
#303120
passed with warnings
4 months ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
etracker.module
+10
-19
10 additions, 19 deletions
etracker.module
with
10 additions
and
19 deletions
etracker.module
+
10
−
19
View file @
9fa42b04
...
...
@@ -339,7 +339,7 @@ function _etracker_set_default_variables(ImmutableConfig $config) {
// $titles is typically a string, but may also be a render array.
// We do only handle scalar titles here.
if
(
is_scalar
(
$titles
[
0
]))
{
$variables
[
'et_areas'
][]
=
implode
(
'/'
,
$titles
);
$variables
[
'et_areas'
][]
=
implode
(
'/'
,
$titles
);
}
}
}
...
...
@@ -527,7 +527,7 @@ function _etracker_user_should_be_tracked(ImmutableConfig $config) {
* A config object.
*
* @return bool
* Whether
or not
the account key is set.
* Whether the account key is set.
*/
function
_etracker_account_key_configured
(
ImmutableConfig
$config
)
{
$account_key
=
$config
->
get
(
'account_key'
);
...
...
@@ -540,7 +540,7 @@ function _etracker_account_key_configured(ImmutableConfig $config) {
}
/**
* Whether
or not
the current request should be tracked.
* Whether the current request should be tracked.
*
* @param \Drupal\Core\Config\ImmutableConfig $config
* A config object.
...
...
@@ -565,20 +565,11 @@ function _etracker_request_should_be_tracked(ImmutableConfig $config) {
* Returns an array or mixed or null.
*/
function
_etracker_get_language_settings
()
{
$config
=
Drupal
::
config
(
Constants
::
ETRACKER_SETTINGS_CONFIG_NAME
);
$languages
=
Drupal
::
languageManager
()
->
getLanguages
();
$language_settings
=
count
(
$languages
)
==
1
?
[
'tag'
=>
0
,
'area prefix'
=>
0
,
'area suffix'
=>
0
,
'page title prefix'
=>
0
,
]
:
$config
->
get
(
'etracker_multilingual'
);
$language_settings
[
'current language'
]
=
Drupal
::
languageManager
()
->
getCurrentLanguage
()
->
getId
();
return
$language_settings
;
return
[
'tag'
=>
0
,
'area prefix'
=>
0
,
'area suffix'
=>
0
,
'page title prefix'
=>
0
,
'current language'
=>
Drupal
::
languageManager
()
->
getCurrentLanguage
()
->
getId
()
];
}
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