mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
can modify tooltip by reference
This commit is contained in:
@@ -1116,7 +1116,7 @@ class Reception extends CommonObject
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $hookmanager;
|
||||
$result = '';
|
||||
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Reception").'</u>';
|
||||
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
||||
@@ -1149,6 +1149,16 @@ class Reception extends CommonObject
|
||||
$result .= ' ';
|
||||
}
|
||||
$result .= $linkstart.$this->ref.$linkend;
|
||||
|
||||
global $action;
|
||||
$hookmanager->initHooks(array('receptiondao'));
|
||||
$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
|
||||
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook > 0) {
|
||||
$result = $hookmanager->resPrint;
|
||||
} else {
|
||||
$result .= $hookmanager->resPrint;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user