2
0
forked from Wavyzz/dolibarr

NEW: for developpers add hook for moreHTMLRef in dol_banner_tab

This commit is contained in:
Florian HENRY
2021-11-03 16:18:03 +01:00
parent 960319fd8a
commit a4c4732d5d
2 changed files with 14 additions and 2 deletions

View File

@@ -1845,7 +1845,7 @@ function dol_get_fiche_end($notab = 0)
*/
function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '')
{
global $conf, $form, $user, $langs;
global $conf, $form, $user, $langs, $hookmanager;
$error = 0;
@@ -2116,6 +2116,17 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$morehtmlref .= '</div>';
}
$parameters=array('morehtmlref'=>$morehtmlref);
$reshook = $hookmanager->executeHooks('formDolBanner', $parameters, $object, '');
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
$morehtmlref .= $hookmanager->resPrint;
} elseif ($reshook > 0) {
$morehtmlref = $hookmanager->resPrint;
}
print '<div class="'.($onlybanner ? 'arearefnobottom ' : 'arearef ').'heightref valignmiddle centpercent">';
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
print '</div>';