Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
office_hours
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
23
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
office_hours
Commits
e717ad0e
Commit
e717ad0e
authored
1 year ago
by
John Voskuilen
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3402450
: Remove duplicate key from ComplexWeekWidget
parent
570e063e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#52962
passed with warnings with stages
in 2 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Field/FieldWidget/OfficeHoursComplexWeekWidget.php
+3
-2
3 additions, 2 deletions
...Plugin/Field/FieldWidget/OfficeHoursComplexWeekWidget.php
with
3 additions
and
2 deletions
src/Plugin/Field/FieldWidget/OfficeHoursComplexWeekWidget.php
+
3
−
2
View file @
e717ad0e
...
...
@@ -40,7 +40,8 @@ class OfficeHoursComplexWeekWidget extends OfficeHoursSeasonWidget {
/** @var \Drupal\office_hours\Plugin\Field\FieldType\OfficeHoursItemList $items */
/** @var \Drupal\office_hours\Plugin\Field\FieldWidget\OfficeHoursWeekWidget $widget */
$field_type
=
'office_hours'
;
$element
[
$field_type
][
0
]
=
parent
::
formElement
(
$items
,
$delta
,
$element
,
$form
,
$form_state
);
$id
=
0
;
$element
[
$field_type
][
$id
]
=
parent
::
formElement
(
$items
,
$delta
,
$element
,
$form
,
$form_state
);
$items
->
filterEmptyItems
();
// Then, add a List Widget for the Exception days.
...
...
@@ -49,9 +50,9 @@ class OfficeHoursComplexWeekWidget extends OfficeHoursSeasonWidget {
$plugin_id
=
'office_hours_exceptions_only'
;
$field_definition
=
$items
->
getFieldDefinition
(
$field_type
);
$id
=
0
;
$widget
=
$this
->
getOfficeHoursPlugin
(
'widget'
,
$plugin_id
,
$field_definition
);
$id
++
;
$widget_form
=
$widget
->
form
(
$items
,
$form
,
$form_state
);
// @todo #3335549 Decide to use complete form or only ['widget'] part.
$element
[
$field_type
][
$id
]
=
$widget_form
[
'widget'
];
...
...
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