-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Custom HTML in Workflow Notes #7667
Conversation
* @param $customHtmlService | ||
*/ | ||
public function setCustomHtmlService($customHtmlService) { | ||
if ($customHtmlService instanceof AbstractCustomHtmlService) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instanceof CustomHtmlServiceInterface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, no, actually that is fine.... But the AbstractCustomHtmlService should be a interface with it's extra functions, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean an additional interface for getTransitionName()
, getActionName()
, getPosition()
and so forth?
Don't know if this is necessary, as those fields are intended to be mainly used within the class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure honestly... I always use separate interfaces, also for this use-cases. What if a custom Symfony (not Pimcore) Workflow tries to do this?
doc/Development_Documentation/07_Workflow_Management/01_Configuration_Details/README.md
Outdated
Show resolved
Hide resolved
doc/Development_Documentation/07_Workflow_Management/01_Configuration_Details/README.md
Outdated
Show resolved
Hide resolved
@chilladelia thanks a lot! |
Thanks for merging! |
* Support custom HTML in transition notes. * Support global actions. * Support global actions. * Support multiple custom HTML labels within one renderer. * Set default value for position. * Correctly inject custom HTML service properties via compiler pass. * Fix annotation. * Improve comments. * Add autowiring / fix build issue. * Support workflow modal without note. * Apply suggestions from code review Co-authored-by: agruenwald <a.gruenw@gmail.com> Co-authored-by: Divesh Pahuja <divesh.pahuja@pimcore.com>
This PR allows the configuration of renderers to dynamically output HTML markup in Workflow notes.
This is useful to show summaries and alike, before the user is actually going to commit the workflow change.
Example:
Notes can be placed on three different positions (top, center, bottom) for both transitions, and global actions.
A custom renderer service and a default position can be configured in the workflow configuration yml.