Merge pull request #22945 from cfoellmann/PR/hook-llxfooter

NEW - add hook 'llxFooter'
This commit is contained in:
Laurent Destailleur 2023-01-02 01:55:45 +01:00 committed by GitHub
commit 798d123d92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -198,6 +198,7 @@ class HookManager
'getIdProfUrl',
'getInputIdProf',
'isPaymentOK',
'llxFooter',
'menuDropdownQuickaddItems',
'menuLeftMenuItems',
'moveUploadedFile',

View File

@ -3240,7 +3240,20 @@ if (!function_exists("llxFooter")) {
global $contextpage, $page, $limit, $mode;
global $dolibarr_distrib;
$ext = 'layout='.$conf->browser->layout.'&version='.urlencode(DOL_VERSION);
$ext = 'layout='.urlencode($conf->browser->layout).'&version='.urlencode(DOL_VERSION);
// Hook to add more things on all pages within fiche DIV
$llxfooter = '';
$parameters = array();
$reshook = $hookmanager->executeHooks('llxFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$llxfooter .= $hookmanager->resPrint;
} elseif ($reshook > 0) {
$llxfooter = $hookmanager->resPrint;
}
if ($llxfooter) {
print $llxfooter;
}
// Global html output events ($mesgs, $errors, $warnings)
dol_htmloutput_events($disabledoutputofmessages);