- Issue created by @mindaugasd
- Status changed to Needs review
about 1 year ago 9:14pm 6 January 2024 - 🇯🇵Japan eleonel Itoshima 🇯🇵
I added two new hooks to alter the input configuration and results:
hook_pre_execute(array &$request_body)
This hook is invoked before the augmentor processing begins. It allows other modules to alter the decoded request body.
Parameters
:
$request_body (array): The decoded request body. It is an associative array that contains the keys 'input' and 'augmentor' (and many others)Usage:
Implement this hook to modify the request body before the augmentor processes it. For example, you can add, remove, or alter the contents of $request_body.
Example:
function mymodule_pre_execute(array &$request_body) { // Modify the request body as needed. if (isset($request_body['input'])) { $request_body['input'] = "Modified Input"; } }
hook_post_execute(array &$result)
This hook is invoked after the augmentor execution is completed. It allows other modules to alter the results of the execution.
Parameters:
$result (array): The results of the augmentor execution. It is an associative array of the results.
Usage:
Implement this hook to modify the results after the augmentor execution. For example, you can process or reformat the results as needed.
Example:
function mymodule_post_execute(array &$result) { // Process or alter the results. if (!empty($result)) { $result['additional_info'] = "Processed Result"; } }
- Status changed to Fixed
9 months ago 7:32am 1 May 2024 Automatically closed - issue fixed for 2 weeks with no activity.