|
dolibarr 25.0.0-alpha
|
Public Member Functions | |
| __construct ($db=null) | |
| Constructor. | |
| addMoreActionsEmailCollector ($parameters, &$object, &$action, $hookmanager) | |
| Add AI Email Cleaner action in EmailCollector operations. | |
| doCollectImapOneCollector ($parameters, &$object, &$action, $hookmanager) | |
| Execute AI cleaner when EmailCollector operation type is "hook_ai_emailcleaner". | |
| printFieldListValue ($parameters, &$object, &$action) | |
| Collect the id of each rendered list row. | |
| printCommonFooter ($parameters, &$object, &$action) | |
| Emit the current page context for the assistant popover. | |
Class ActionsAi.
Definition at line 30 of file actions_ai.class.php.
| ActionsAi::__construct | ( | $db = null | ) |
Constructor.
Definition at line 52 of file actions_ai.class.php.
| ActionsAi::addMoreActionsEmailCollector | ( | $parameters, | |
| & | $object, | ||
| & | $action, | ||
| $hookmanager ) |
Add AI Email Cleaner action in EmailCollector operations.
| array<string,mixed> | $parameters Hook context parameters | |
| CommonObject | $object | Email collector object |
| string | $action | Current action code |
| HookManager | $hookmanager | Hook manager |
Definition at line 66 of file actions_ai.class.php.
References getDolGlobalInt(), and EmailCleaner\isRuntimeAvailable().
| ActionsAi::doCollectImapOneCollector | ( | $parameters, | |
| & | $object, | ||
| & | $action, | ||
| $hookmanager ) |
Execute AI cleaner when EmailCollector operation type is "hook_ai_emailcleaner".
| array<string,mixed> | $parameters Hook context parameters | |
| CommonObject | $object | Email collector object |
| string | $action | Current action code |
| HookManager | $hookmanager | Hook manager |
Definition at line 92 of file actions_ai.class.php.
References $object, getDolGlobalInt(), EmailCleaner\isEmailCollectorHookAction(), and EmailCleaner\isRuntimeAvailable().
| ActionsAi::printCommonFooter | ( | $parameters, | |
| & | $object, | ||
| & | $action ) |
Emit the current page context for the assistant popover.
Runs on every page footer and emits window.aiPageContext, the page identity the chat JS posts back with each request so the assistant resolves references like "this invoice" or "the selected rows".
Three page shapes are recognized:
Trust boundary: this emission is a hint, never an authorization. The POST that carries it back is client-controlled, so parse_intent.php re-validates everything independently on every chat request (element whitelist, fetch, user rights, entity) before any of it reaches the prompt.
| array<string,mixed> | $parameters Hook parameters | |
| CommonObject | null | $object | Current object, when the page sets one |
| string | $action | Current action |
Definition at line 184 of file actions_ai.class.php.
References $conf, $context, $object, dol_string_nohtmltag(), getDolGlobalString(), getNonce(), and isModEnabled().
| ActionsAi::printFieldListValue | ( | $parameters, | |
| & | $object, | ||
| & | $action ) |
Collect the id of each rendered list row.
printFieldListValue is an existing hook fired once per row inside every standard list loop, the HookManager reuses this instance for the whole request, so the ids accumulate here and printCommonFooter (which fires later on the same page) emits them.
| array<string,mixed> | $parameters Hook parameters ('obj' = row) | |
| CommonObject | $object | Page object |
| string | $action | Current action |
Definition at line 143 of file actions_ai.class.php.