- πΊπΈUnited States mmenavas
Unfortunately patch #10 does not work on the recently released version 8.x-3.3.
- πΊπΈUnited States grgcrlsn321
Rerolled the patch for latest release 8.x-3.3.
- Status changed to Needs work
over 1 year ago 8:27pm 21 July 2023 - πΊπΈUnited States danflanagan8 St. Louis, US
This looks like a useful feature. However, I think there are a few things to address before this could be committed.
+++ b/src/Plugin/Field/FieldFormatter/AddToCalendar.php @@ -209,7 +223,7 @@ class AddToCalendar extends FormatterBase implements ContainerFactoryPluginInter - public function getProperValue(array $field_setting, $entity, array $options = []) { + public function getProperValue($field_setting_name, array $field_setting, $entity, array $options = array()) {
Since this is a public method, I think we'd need to add the new argument as an optional argument at the end of the argument list.
+++ b/src/Plugin/Field/FieldFormatter/AddToCalendar.php @@ -89,11 +98,14 @@ class AddToCalendar extends FormatterBase implements ContainerFactoryPluginInter - public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AddToCalendarApiWidget $add_to_calendar_api_widget, Token $token, RendererInterface $renderer = NULL) { + public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, AddToCalendarApiWidget $add_to_calendar_api_widget, Token $token, RendererInterface $renderer = NULL, ModuleHandlerInterface $module_handler) {
If we're adding an argument to the constructor, we should add a BC layer similar to what was just added for the
$renderer
argument.+++ b/src/Plugin/Field/FieldFormatter/AddToCalendar.php @@ -243,6 +257,17 @@ class AddToCalendar extends FormatterBase implements ContainerFactoryPluginInter + // @see addtocalendar.api.php
This patch appears to be missing the addtocalendar.api.php file.
Thanks!
- πΊπΈUnited States grgcrlsn321
Really appreciate the input @danflanagan8, I updated the patch with your suggestions and made sure to include the addtocalendar.api.php file.
Thanks!
- πΊπΈUnited States grgcrlsn321
Made a small typo on the last patch file upload. Use this patch for 8.x-3.3 release.
-
danflanagan8 β
committed c2816085 on 8.x-3.x authored by
grgcrlsn321 β
Issue #3002818 by grgcrlsn321, Ruslan Piskarov, pixelwhip, rrrob,...
-
danflanagan8 β
committed c2816085 on 8.x-3.x authored by
grgcrlsn321 β
- Status changed to Fixed
over 1 year ago 3:51pm 7 August 2023 - πΊπΈUnited States danflanagan8 St. Louis, US
Thanks all! I committed a fix for this. It's a slightly cleaned up version of #15
Here's the interdiff between 15 and what I committed.
Automatically closed - issue fixed for 2 weeks with no activity.