Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The missing PHP opening tag prevents interface declaration and causes application initialization to fail.
2 open findings
What changed in this PR
Adds a backoffice extension hook for customizing stimulus forms, supporting integrations such as template buttons.
Changes:
- Introduces and registers
iStimulusFormExtension. - Calls
OnDisplayStimulusForm()when displaying a stimulus dialog.
| File | Description |
|---|---|
| core/metamodel.class.php | Registers the extension API for discovery. |
| application/cmdbabstract.class.inc.php | Invokes the stimulus-form hook. |
| application/applicationextension/backoffice/iStimulusFormExtension.php | Defines the callback interface. |
| application/applicationextension.inc.php | Loads the new interface file. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| 'iLoginUIExtension', | ||
| 'iPreferencesExtension', | ||
| 'iApplicationUIExtension', | ||
| 'iStimulusFormExtension', |
Contributor
There was a problem hiding this comment.
Maybe an idea to start using this notation here as well:
Suggested change
| 'iStimulusFormExtension', | |
| iStimulusFormExtension::class, |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
5 tasks
Member
|
Hello @TdlQ, thank you for your PR. It has been accepted functionally, and we'll work on it on iTop 3.4. |
Member
|
Could you please provide an example (code snippet/delta XML) so our QA can test the PR with ease ? That would be really nice, thank you! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


I haven't created an issue but this has been discussed with Combodo people before.
Base information
Objective (enhancement)
Much like OnDisplayProperties is used to customize the object display interface, this PR introduces OnDisplayStimulusForm, which allows customizing the stimulus form interface. There are several potential use cases; mine was to patch the "precanned-replies" extension and add its "Templates" button to the UserRequest form to make the extension compatible with the solution field.
Proposed solution
I've added interface iStimulusFormExtension which holds OnDisplayStimulusForm().
OnDisplayStimulusForm() is called from DisplayStimulusForm() of cmdbAbstractObject.
Checklist before requesting a review