Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
eca
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
eca
Commits
c055bf22
Commit
c055bf22
authored
3 weeks ago
by
Jürgen Haas
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3502470
by jurgenhaas: ECA Content: create bundle should provide some tokens
parent
bc23900a
No related branches found
Branches containing commit
Tags
8.x-1.11
Tags containing commit
No related merge requests found
Pipeline
#407026
canceled
3 weeks ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/content/src/Plugin/ECA/Event/ContentEntityEvent.php
+28
-0
28 additions, 0 deletions
modules/content/src/Plugin/ECA/Event/ContentEntityEvent.php
with
28 additions
and
0 deletions
modules/content/src/Plugin/ECA/Event/ContentEntityEvent.php
+
28
−
0
View file @
c055bf22
...
...
@@ -558,6 +558,27 @@ class ContentEntityEvent extends EventBase implements CleanupInterface {
new
Token
(
name
:
'ids'
,
description
:
'The IDs of the entities.'
),
],
)]
#
[
Token
(
name
:
'event'
,
description
:
'The event.'
,
classes
:
[
ContentEntityViewModeAlter
::
class
,
],
properties
:
[
new
Token
(
name
:
'view_mode'
,
description
:
'The view mode machine name.'
),
],
)]
#
[
Token
(
name
:
'event'
,
description
:
'The event.'
,
classes
:
[
ContentEntityBaseBundle
::
class
,
],
properties
:
[
new
Token
(
name
:
'entity_type_id'
,
description
:
'The entity type.'
),
new
Token
(
name
:
'bundle'
,
description
:
'The bundle machine name.'
),
],
)]
protected
function
buildEventData
():
array
{
$event
=
$this
->
event
;
$data
=
[];
...
...
@@ -573,6 +594,13 @@ class ContentEntityEvent extends EventBase implements CleanupInterface {
'view_mode'
=>
$event
->
getViewMode
(),
];
}
elseif
(
$event
instanceof
ContentEntityBaseBundle
)
{
$x
=
1
;
$data
+=
[
'entity_type_id'
=>
$event
->
getEntityTypeId
(),
'bundle'
=>
$event
->
getBundle
(),
];
}
$data
+=
parent
::
buildEventData
();
return
$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