Document preview PDF generation events for Emails and Landing Pages#508
Document preview PDF generation events for Emails and Landing Pages#508promptless-for-oss wants to merge 6 commits into
Conversation
Add developer documentation for the new event-driven PDF generation feature that allows plugins and distributions to provide custom PDF renderers for Email and Landing Page preview downloads. Documents: - EMAIL_PREVIEW_GENERATE_PDF event in EmailBundle - PAGE_PREVIEW_GENERATE_PDF event in PageBundle - Event payload, methods, and usage examples Related to mautic/mautic#16187
| This section is in progress. See ``\Mautic\EmailBundle\Stats\Helper\StatHelperInterface`` | ||
|
|
||
| Preview PDF generation | ||
| ---------------------- |
There was a problem hiding this comment.
Event details, class names (EmailPreviewPdfGenerationEvent, EmailEvents::EMAIL_PREVIEW_GENERATE_PDF), and default subscriber priority (-255) from the PR's new EmailBundle/Event/EmailPreviewPdfGenerationEvent.php and EmailBundle/EventListener/EmailPreviewPdfSubscriber.php files.
Source: mautic/mautic#16187
| } | ||
|
|
||
| Preview PDF generation | ||
| ********************** |
There was a problem hiding this comment.
Event details, class names (PagePreviewPdfGenerationEvent, PageEvents::PAGE_PREVIEW_GENERATE_PDF), and default subscriber priority (-255) from the PR's new PageBundle/Event/PagePreviewPdfGenerationEvent.php and PageBundle/EventListener/PagePreviewPdfSubscriber.php files.
Source: mautic/mautic#16187
…F preview events Incorporates additional details from the PR author's proposal: - Default subscriber and generator class names - Route paths for email and page preview PDF downloads - Behavior note when no listener sets PDF content (500 error) - Simplified note about priority override
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
- Add Vale directives around headings to suppress warnings - Capitalize Plugins and User per Mautic style guide - Replace renderers with generators for clarity - Convert numbered lists to #. format per RST style - Replace check with verify in method descriptions - Fix capitalization in payload method descriptions
|
Thanks for the detailed review @adiati98! I've addressed all your suggestions: Applied across both
Ready for another look when you have a chance. |
Addresses PR review feedback from @adiati98 to clarify that getPage() returns the Landing Page entity specifically.
|
Done! Updated |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
Addresses PR review feedback: wraps the method bullet lists in `.. vale off` / `.. vale on` directives to suppress Vale linting on technical method descriptions.
|
Applied the suggested changes. Both method lists in the "Event payload" sections are now wrapped in |
Open this suggestion in Promptless to view citations and reasoning process
Adds developer documentation for the new event-driven PDF generation feature introduced in mautic/mautic#16187. Documents the EMAIL_PREVIEW_GENERATE_PDF and PAGE_PREVIEW_GENERATE_PDF events, including event payload, methods, and code examples showing how plugins can provide custom PDF renderers.
Trigger Events
Tip: Attach PDFs in Slack messages to Promptless—it can even extract images from them 📎