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)
Updated by Alexander Opitz over 10 years ago
- Status changed from New to Needs Feedback
- Target version deleted (
0)
Since TYPO3 CMS 6.0 there are Signals/Slots, which are easier then the mentioned code. See http://blog.tolleiv.de/2011/11/signal-slots-in-extbase/
So, can we close this issue?
Updated by Alexander Opitz about 10 years ago
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.
Updated by Alexander Opitz about 10 years ago
- Status changed from Needs Feedback to Closed