Closed ceekay73 closed 5 years ago
I would rather implement a signal slot (TYPO3 Api Reference), so everyone can do everything according to his needs. What do you think?
Sounds good - that's a more general approach.
Ok, I will go for that, but I dont have time to do it before middle of June.
The following signal slots are added:
I your own extension you catch a signal from the slot in createAction()
(so just before saving a new record) with the following lines of code:
ext_localconf.php
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
// slot for ext:md_newsfrontend
$signalSlotDispatcher->connect(
\Mediadreams\MdNewsfrontend\Controller\NewsController::class,
'createActionBeforeSave',
\Vendor\Extension\Slot\YourClass::class,
'yourMethod'
);
The method yourMethod($news, $obj)
receives two parameter:
Add your class \Vendor\Extension\Slot\YourClass
with the method yourMethod
and you are ready to go.
Is this (current master) working for your?
Yes, it's working perfectly. Thanks for implementing this so quickly.
Version 1.1.0 is released :-)
Would it be possible to implement a notification mail to a (typoscript) defined mailadress when FE-user creates or updates an entry?