New: add pdf_getLinkedObjects hook
This commit is contained in:
parent
85a11c02f4
commit
f39e156f3a
@ -1610,9 +1610,10 @@ function pdf_getCurrencySymbol(&$pdf, $currency_code)
|
|||||||
*
|
*
|
||||||
* @param object $object Object
|
* @param object $object Object
|
||||||
* @param Translate $outputlangs Object lang for output
|
* @param Translate $outputlangs Object lang for output
|
||||||
|
* @param HookManager $hookmanager Hook manager instance
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function pdf_getLinkedObjects($object,$outputlangs)
|
function pdf_getLinkedObjects($object,$outputlangs,$hookmanager=false)
|
||||||
{
|
{
|
||||||
$linkedobjects=array();
|
$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;
|
return $linkedobjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user