New: add pdf_getLinkedObjects hook

This commit is contained in:
Regis Houssin 2012-03-02 08:31:38 +01:00
parent 85a11c02f4
commit f39e156f3a

View File

@ -1610,9 +1610,10 @@ function pdf_getCurrencySymbol(&$pdf, $currency_code)
*
* @param object $object Object
* @param Translate $outputlangs Object lang for output
* @param HookManager $hookmanager Hook manager instance
* @return void
*/
function pdf_getLinkedObjects($object,$outputlangs)
function pdf_getLinkedObjects($object,$outputlangs,$hookmanager=false)
{
$linkedobjects=array();
@ -1646,6 +1647,13 @@ function pdf_getLinkedObjects($object,$outputlangs)
}
}
if (is_object($hookmanager))
{
$parameters = array('linkedobjects' => $linkedobjects, 'outputlangs'=>$outputlangs);
$action='';
$linkedobjects = $hookmanager->executeHooks('pdf_getLinkedObjects',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
return $linkedobjects;
}