Conversation
dvlpp
left a comment
There was a problem hiding this comment.
The only way to properly handle this is to allow to override the existing SharpEntity::getLabel() method. We can already do this for getShow() or getForm(). Adding a new label() method for this is too confusing in my opinion.
I choose to use label() instead of getLabel() because getLabel handles mutliforms and is too "complicated" to overwrite without risking to broke sharp (we can't ask end users to handle multiform each time they want to localize an entity label). sharp/src/Utils/Entities/SharpEntity.php Lines 64 to 67 in 284917b Another option would be to swap those methods (handle multiform from |
Allow to override SharpEntity::getLabel()
No description provided.