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 #1

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?

Actions #2

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.

Actions #3

Updated by Alexander Opitz about 10 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF