Merge pull request #14202 from pstructures/PSdevelop
Added Hook to showOptionals Function
This commit is contained in:
commit
f2c84fba3d
@ -6711,10 +6711,14 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
public function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0)
|
public function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0)
|
||||||
{
|
{
|
||||||
global $db, $conf, $langs, $action, $form;
|
global $db, $conf, $langs, $action, $form, $hookmanager;
|
||||||
|
|
||||||
if (!is_object($form)) $form = new Form($db);
|
if (!is_object($form)) $form = new Form($db);
|
||||||
|
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('showOptionals',$parameters,$this,$action); // Note that $action and $object may have been modified by hook
|
||||||
|
if (empty($reshook))
|
||||||
|
{
|
||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0)
|
if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0)
|
||||||
@ -6942,6 +6946,7 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $out;
|
return $out;
|
||||||
|
} // end of hook manager
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user