Skip to content

Commit

Permalink
Add hook getnomurltooltip on contract
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jun 24, 2019
1 parent a7bd734 commit 83ec64d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion htdocs/contrat/class/contrat.class.php
Expand Up @@ -1920,7 +1920,7 @@ public function LibStatut($statut, $mode)
*/
public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1)
{
global $conf, $langs, $user;
global $conf, $langs, $user, $hookmanager, $action;

$result='';

Expand Down Expand Up @@ -1962,6 +1962,14 @@ public function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_
}
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"';

if (is_object($hookmanager))
{
$hookmanager->initHooks(array('contractdao'));
$parameters=array('id'=>$this->id);
$reshook=$hookmanager->executeHooks('getnomurltooltip', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $linkclose = $hookmanager->resPrint;
}
}

$linkstart = '<a href="'.$url.'"';
Expand Down

0 comments on commit 83ec64d

Please sign in to comment.