Paragraphs Behaviours have become a solid tool in Paragraphs managements and configurations.
They are supported in the but not in the "Paragraphs EXPERIMENTAL" ("paragraphs") widget,
but not in the "Paragraphs Classic" ("entity_reference_paragraphs") widget, from which the actual "Entity reference layout (With layout builder)" started extending since its beginning ...
The Paragraphs Behaviours supporting part of the "Paragraphs EXPERIMENTAL" ("paragraphs") widget should be added in the "Entity reference layout (With layout builder)") widget ...
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | interdiff.txt | 926 bytes | justin2pin |
| #7 | 3128137-7.patch | 10.07 KB | justin2pin |
| #5 | interdiff.txt | 2.11 KB | justin2pin |
| #4 | interdiff.txt | 3.8 KB | justin2pin |
Comments
Comment #2
justin2pin commentedThis patch adds behavior forms to each applicable paragraph dialog within a "Behaviors" detail form item.
Comment #3
itamair commentedThanks @Justin that is great, and is working great. But from my Review I faced a use case in which a better handling is needed when there is a Paragraph Behaviour enabled for the specific Paragraph Type but that doesn't a specific configuration form (buildBehaviorForm method).
It might happen ... (check your new "paragraphs_layout" behaviour). In that case Behaviours accordion won't show any reference to init and will appear empty in case this is the only Behaviour enabled for the Paragraph Type ...
The attached patch fixes all that, both in the Behaviours form definition (adding a mention to the Behaviour with no specific configurations settings, and with the link to the Paragraph entity type settings page (@see attached screenshot) and in the Submission validation (we need that otherwise an error will be thrown on the $plugin_form validation.
Besides it, the patch also fixes some coding standards and methods @return statements.
RTBC
Comment #4
justin2pin commentedLet's hide the behaviors subforms entirely when there is nothing to render. Patch attached.
Comment #5
justin2pin commentedOne more minor change to make sure the behavior form is actually hidden when there are no options to show.
Comment #6
itamair commentedJustin, your last patch seems removing the publish/un-publish support:
Comment #7
justin2pin commentedGeez, too many projects open. Thanks for the catch -- re-roll and inter-diff attached.
Comment #8
itamair commented#7 works fine. Green flag for commit ;-)
Comment #10
justin2pin commented