Feature #18930
closedNew function makeHook() to make a hook in the extension in a simple way
0%
Description
It would be great if a function exists like makeHook() to provide a hook in the own extension instead of the long writing like:
if(is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['comments']['processSubmission'])) {
foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['comments']['processSubmission'] as $userFunc) {
$params = array(
'record' => $record,
'pObj' => &$this,
);
if (($newRecord = t3lib_div::callUserFunction($userFunc, $params, $this))) {
$record = $newRecord;
}
}
}
The function makeHook() could do the same in the following way:
$record = $this->makeHook('hookname', $params, $this);
By this way it would be much easier for extension developers to provide a hook in the own extension.
(issue imported from #M8667)