Repository navigation
Add hook in ticket parameter to add and change new variables - #20880
Conversation
cedric-anne
left a comment
There was a problem hiding this comment.
Hi,
Thanks for the contribution.
- This should be made in a generic way.
For instance, to get additionnal parameters, you can do something like that in the TemplateDocumentation class, to make the plugin being able to define additional parameters for all the supported object types.
$additionnal_parameters = [];
foreach ($PLUGIN_HOOKS[Hooks::SHOW_ITEM_RESP_PARAM] as $plugin => $hook_callable) {
$plugin_parameters = Plugin::doOneHook($plugin, Hooks::SHOW_ITEM_RESP_PARAM, $parameters_class::getDefaultNodeName());
if (is_array($plugin_parameters)) {
array_push($additionnal_parameters, ...$plugin_parameters);
}
}- The naming is not correct. These hooks will be used to add additionnal user templates nodes, so something like
get_content_template_parameterandget_content_template_valuewould be more appropriate.
Hello, |
f3026a0 to
a909c45
Compare
a909c45 to
bb5785d
Compare
|
Sorry for the delay. I rebased your branch to fix conflicts, and added a commit to rename the hook parameters ( |
|
This PR has been is closed and has been automatically locked. Please open a new issue with all requested information for related bugs. |
Checklist before requesting a review
Please delete options that are not relevant.
Description