Project

General

Profile

Actions

Feature #18930

closed

New function makeHook() to make a hook in the extension in a simple way

Added by Sonja Schubert over 16 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-06-10
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

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)

Actions

Also available in: Atom PDF