Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ics_field
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
ics_field
Merge requests
!18
Issue
#2946641
: Support date_recur field type.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#2946641
: Support date_recur field type.
issue/ics_field-2946641:2946641-support-daterecur-field
into
3.x
Overview
0
Commits
10
Pipelines
0
Changes
7
Open
maskedjellybean
requested to merge
issue/ics_field-2946641:2946641-support-daterecur-field
into
3.x
1 year ago
Overview
0
Commits
10
Pipelines
0
Changes
7
Expand
I will comment on the issue with a description of the changes.
0
0
Merge request reports
Compare
3.x
version 5
edb9fd4d
10 months ago
version 4
e3c53fc5
10 months ago
version 3
158e7489
1 year ago
version 2
11ae77d9
1 year ago
version 1
17768b67
1 year ago
3.x (HEAD)
and
latest version
latest version
1c8402fe
10 commits,
10 months ago
version 5
edb9fd4d
9 commits,
10 months ago
version 4
e3c53fc5
8 commits,
10 months ago
version 3
158e7489
7 commits,
1 year ago
version 2
11ae77d9
6 commits,
1 year ago
version 1
17768b67
5 commits,
1 year ago
7 files
+
321
−
77
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
src/CalendarProperty/CalendarPropertyProcessor.php
+
25
−
4
Options
@@ -128,10 +128,11 @@ class CalendarPropertyProcessor {
*/
private
function
processDateList
(
ContentEntityInterface
$contentEntity
)
{
$
calendarProperties
=
[];
$
datesList
=
[];
if
(
!
empty
(
$this
->
dateFieldReference
))
{
foreach
(
$contentEntity
->
get
(
$this
->
dateFieldReference
)
->
getValue
()
as
$dateVal
)
{
->
getValue
()
as
$key
=>
$dateVal
)
{
// Add start date.
$date
=
NULL
;
if
(
isset
(
$dateVal
[
'value'
]))
{
$date
=
$dateVal
[
'value'
];
@@ -142,11 +143,31 @@ class CalendarPropertyProcessor {
}
if
(
$date
)
{
$calendarProperties
[]
=
date
(
"Y-m-d\TH:i:s"
,
strtotime
(
$date
));
$datesList
[
$key
][
'startdate'
]
=
date
(
"Y-m-d\TH:i:s"
,
strtotime
(
$date
));
}
// Add end date.
if
(
isset
(
$dateVal
[
'end_value'
]))
{
$date
=
$dateVal
[
'end_value'
];
// TODO: Remove the check for DrupalDateTime,should be a string-ed date.
if
(
$date
instanceof
DrupalDateTime
)
{
$date
=
$dateVal
[
'end_value'
]
->
render
();
}
if
(
$date
)
{
$datesList
[
$key
][
'enddate'
]
=
date
(
"Y-m-d\TH:i:s"
,
strtotime
(
$date
));
}
}
// Add RRULE.
// This will only be set if the field is a date_recur field.
if
(
isset
(
$dateVal
[
'rrule'
]))
{
$datesList
[
$key
][
'rrule'
]
=
$dateVal
[
'rrule'
];
}
}
}
return
$
calendarProperties
;
return
$
datesList
;
}
/**
Loading