- π¦πΉAustria hudri Austria
Just for information, the latest patch still works with LinkIt v6.0.0-beta4 (and the corresponding link field patch for beta4)
- πΊπΈUnited States jds1 Hudson Valley, NY
Adjusted the patch in #20 so that it's D10 compatible/not flagged by Upgrade Status
- π©πͺGermany Anybody Porta Westfalica
Nice work! And a good choice to put this into a submodule. Still needs tests and it would be nice, if someone could implement it as merge request!
- last update
over 1 year ago 4 pass - last update
over 1 year ago Composer require failure - @jeroent opened merge request.
- Status changed to Needs review
over 1 year ago 8:36am 22 June 2023 - π§πͺBelgium JeroenT π§πͺ
Moved the patch to a MR and added test coverage.
- Status changed to Needs work
over 1 year ago 7:06am 4 July 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Nice work, left a review
- Status changed to Needs review
over 1 year ago 11:45am 12 July 2023 - π§πͺBelgium JeroenT π§πͺ
I moved the widget related code to a trait.
- Status changed to Needs work
over 1 year ago 7:47am 19 July 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Per comments on the MR
Thanks again, we're really close here πͺ
- Status changed to Needs review
over 1 year ago 12:54pm 19 July 2023 - π§πͺBelgium JeroenT π§πͺ
Moved the constants back to the field widget class.
- Status changed to Fixed
over 1 year ago 7:26am 26 July 2023 - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Fixed some PHPCS and a merge conflict on commit
diff --git a/src/LinkWithAttributesWidgetTrait.php b/src/LinkWithAttributesWidgetTrait.php index f4b31be..eb220df 100644 --- a/src/LinkWithAttributesWidgetTrait.php +++ b/src/LinkWithAttributesWidgetTrait.php @@ -6,6 +6,9 @@ use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\link_attributes\Plugin\Field\FieldWidget\LinkWithAttributesWidget; +/** + * Provides a trait for link widgets with attributes. + */ trait LinkWithAttributesWidgetTrait { /** @@ -13,18 +16,18 @@ trait LinkWithAttributesWidgetTrait { */ public static function defaultSettings() { return [ - 'placeholder_url' => '', - 'placeholder_title' => '', - 'enabled_attributes' => [ - 'id' => FALSE, - 'name' => FALSE, - 'target' => TRUE, - 'rel' => TRUE, - 'class' => TRUE, - 'accesskey' => FALSE, - ], - 'widget_default_open' => LinkWithAttributesWidget::WIDGET_OPEN_EXPAND_IF_VALUES_SET, - ] + parent::defaultSettings(); + 'placeholder_url' => '', + 'placeholder_title' => '', + 'enabled_attributes' => [ + 'id' => FALSE, + 'name' => FALSE, + 'target' => TRUE, + 'rel' => TRUE, + 'class' => TRUE, + 'accesskey' => FALSE, + ], + 'widget_default_open' => LinkWithAttributesWidget::WIDGET_OPEN_EXPAND_IF_VALUES_SET, + ] + parent::defaultSettings(); } /**
Great work everyone, kudos to @JeroenT for getting this to the finish line.
I'll cut a new 2.1.0 release with this in it π
-
larowlan β
committed 9d20b5a6 on 2.x authored by
jds1 β
Issue #2939514 by JeroenT, Phonoman, cameron prince, adinac, jds1,...
-
larowlan β
committed 9d20b5a6 on 2.x authored by
jds1 β
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
New screenshot for the release notes
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
6 months ago 7:47am 7 June 2024 - π©πͺGermany Anybody Porta Westfalica
Follow-up: π Linkit with attributes widget overrides parent options Needs work