Add hook for additionnal feature on element tooltip

This commit is contained in:
BENKE Charlie 2016-07-14 18:40:49 +02:00 committed by GitHub
parent 2793cee829
commit 26f27487b9

View File

@ -3157,6 +3157,17 @@ class Product extends CommonObject
$linkclose = '" title="'.str_replace('\n', '', dol_escape_htmltag($label, 1)).'" class="classfortooltip">';
if (! is_object($hookmanager))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('productdao'));
$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;
if ($option == 'supplier') {
$link = '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$this->id.$linkclose;
$linkend='</a>';