Closed (fixed)
Project:
Entity Registration
Version:
3.4.x-dev
Component:
Registration Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Mar 2025 at 20:01 UTC
Updated:
5 Apr 2025 at 14:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
milos.kroulik commentedBasic working version is in the MR, I still need to fix the issue mentioned above and check if link rendering is handled correctly.
Comment #4
milos.kroulik commentedShould be ready for review now.
Comment #5
milos.kroulik commentedComment #6
john.oltman commentedThanks for this enhancement. A couple of things:
* The pipeline is throwing phpcs warnings. Look like easy fixes.
* We'll need a test added to RegistrationLinkFormatterTest.php (in tests/src/Kernel/Plugin/Field/Formatter)
Comment #7
john.oltman commentedComment #8
joville commentedWe are often using this great module in our projects and have the need to customize the links in theming. Therefore I am asking wether it would be more flexible to use a link render array like the following for twig link function usage in Theming? There is sometime a need to do this in theme to allow for example to add a fixed default class and adding for example modifier classes in the field formatter. This would enhance the use cases much more.
instead of (Line 155):
Comment #9
joville commentedThere is a patch file for the above comment in #8
Comment #10
john.oltman commentedThanks @joville I think that makes sense - the "toRenderable" function does exactly what you are proposing - except your way removes the need to render the link right away, so it simplifies the change (we can then remove the code related to rendering). And as you mentioned delaying the rendering allows for more theme flexibility for the link.
Comment #11
john.oltman commentedComment #13
john.oltman commentedComment #14
john.oltman commentedComment #15
joville commented@john.oltman Great! Thank you very much for accepting my proposal and for the hint! I have tested the last merge and it does do the job as expected.