Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
recurring_events
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
recurring_events
Commits
7e3a0060
Commit
7e3a0060
authored
5 years ago
by
Owen Bush
Browse files
Options
Downloads
Patches
Plain Diff
Updating tokens
parent
bd112073
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
recurring_events.tokens.inc
+10
-12
10 additions, 12 deletions
recurring_events.tokens.inc
with
10 additions
and
12 deletions
recurring_events.tokens.inc
+
10
−
12
View file @
7e3a0060
...
...
@@ -19,22 +19,22 @@ function recurring_events_token_info() {
];
$eventinstance
[
'title'
]
=
[
'name'
=>
t
(
'Event Title'
),
'name'
=>
t
(
'Event
Instance Inherited
Title'
),
'description'
=>
t
(
'The title of the event instance.'
),
];
$eventinstance
[
'description'
]
=
[
'name'
=>
t
(
'Event Description'
),
'name'
=>
t
(
'Event
Instance Inherited
Description'
),
'description'
=>
t
(
'The description of the event instance.'
),
];
$eventinstance
[
'date'
]
=
[
'name'
=>
t
(
'Event Date'
),
'name'
=>
t
(
'Event
Instance
Date'
),
'description'
=>
t
(
'The date of the event instance.'
),
];
$eventinstance
[
'url'
]
=
[
'name'
=>
t
(
'Event URL'
),
'name'
=>
t
(
'Event
Instance
URL'
),
'description'
=>
t
(
'The URL of the event instance.'
),
];
...
...
@@ -46,12 +46,12 @@ function recurring_events_token_info() {
];
$eventseries
[
'title'
]
=
[
'name'
=>
t
(
'Event Title'
),
'name'
=>
t
(
'Event
Series
Title'
),
'description'
=>
t
(
'The title of the event series.'
),
];
$eventseries
[
'
description
'
]
=
[
'name'
=>
t
(
'Event
Description
'
),
$eventseries
[
'
body
'
]
=
[
'name'
=>
t
(
'Event
Series Body
'
),
'description'
=>
t
(
'The description of the event series.'
),
];
...
...
@@ -78,18 +78,16 @@ function recurring_events_tokens($type, $tokens, array $data, array $options, Bu
foreach
(
$tokens
as
$name
=>
$original
)
{
switch
(
$name
)
{
case
'title'
:
// TODO: Should use the inheritance plugin manager.
$replacements
[
$original
]
=
$event_instance
->
getInheritedTitle
();
break
;
case
'description'
:
// TODO: Should use the inheritance plugin manager.
$replacements
[
$original
]
=
$event_instance
->
getInheritedDescription
();
break
;
case
'date'
:
// TODO: Should format according to what?
$replacements
[
$original
]
=
$event_instance
->
date
->
start_date
->
format
(
'F jS, Y h:iA'
);
$format
=
\Drupal
::
config
(
'recurring_events.eventinstance.config'
)
->
get
(
'date_format'
);
$replacements
[
$original
]
=
$event_instance
->
date
->
start_date
->
format
(
$format
);
break
;
case
'url'
:
...
...
@@ -106,7 +104,7 @@ function recurring_events_tokens($type, $tokens, array $data, array $options, Bu
$replacements
[
$original
]
=
$event_series
->
title
->
value
;
break
;
case
'
description
'
:
case
'
body
'
:
$replacements
[
$original
]
=
$event_series
->
body
->
value
;
break
;
...
...
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