Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
adobe_analytics
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
adobe_analytics
Commits
dbb2e14a
Commit
dbb2e14a
authored
6 months ago
by
Joseph Olstad
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3482803
by joseph.olstad: Automated Drupal 11 compatibility fixes for adobe_analytics
parent
bf6a694c
Branches
8.x-1.x
Tags
8.x-1.0
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
adobe_analytics.info.yml
+1
-1
1 addition, 1 deletion
adobe_analytics.info.yml
src/Form/AdobeAnalyticsAdminSettings.php
+28
-1
28 additions, 1 deletion
src/Form/AdobeAnalyticsAdminSettings.php
with
29 additions
and
2 deletions
adobe_analytics.info.yml
+
1
−
1
View file @
dbb2e14a
name
:
Adobe Analytics
description
:
"
Adds
Adobe
Analytics
javascript
tracking
code
to
your
site's
pages."
type
:
module
core_version_requirement
:
^
9
|| ^1
0
core_version_requirement
:
^
10
|| ^1
1
configure
:
adobe_analytics.settings
dependencies
:
-
field
...
...
This diff is collapsed.
Click to expand it.
src/Form/AdobeAnalyticsAdminSettings.php
+
28
−
1
View file @
dbb2e14a
...
...
@@ -2,6 +2,7 @@
namespace
Drupal\adobe_analytics\Form
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Drupal\Core\Form\ConfigFormBase
;
use
Drupal\Core\Form\FormStateInterface
;
...
...
@@ -10,6 +11,32 @@ use Drupal\Core\Form\FormStateInterface;
*/
class
AdobeAnalyticsAdminSettings
extends
ConfigFormBase
{
/**
* The entity type manager service.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected
$entityTypeManager
;
/**
* Constructs an ExampleConfigForm object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
*/
public
function
__construct
(
EntityTypeManagerInterface
$entity_type_manager
)
{
$this
->
entityTypeManager
=
$entity_type_manager
;
}
/**
* {@inheritdoc}
*/
public
static
function
create
(
$container
)
{
return
new
static
(
$container
->
get
(
'entity_type.manager'
)
);
}
/**
* {@inheritdoc}
*/
...
...
@@ -93,7 +120,7 @@ class AdobeAnalyticsAdminSettings extends ConfigFormBase {
];
$roles
=
[];
foreach
(
user_roles
()
as
$role
)
{
foreach
(
$this
->
entityTypeManager
->
getStorage
(
'user_role'
)
->
loadMultiple
()
as
$role
)
{
$roles
[
$role
->
id
()]
=
$role
->
label
();
}
...
...
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