[TYPO3-mvc] Signal/Slot pattern

Henjo Hoeksma me at henjohoeksma.nl
Wed Dec 21 23:45:55 CET 2011


Hi Tobias,

good you got it working. Please realize t3lib_div::makeInstance is
deprecated notation, you should use the objectManager (as you tried)
nowadays like so:

$signalSlotDispatcher = $this->objectManager->get('Tx_**
Extbase_SignalSlot_Dispatcher'**);

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Wed, Dec 21, 2011 at 18:41, Tobias Pinnekamp <typo3 at tpinne.de> wrote:

> Ok, I got it working.
>
> $signalSlotDispatcher = t3lib_div::makeInstance('Tx_**
> Extbase_SignalSlot_Dispatcher'**);
>
> This works for me!
>
> Am 21.12.11 17:50, schrieb Tobias Pinnekamp:
>
>  Hi all,
>>
>> just want to try out the signal/slot pattern in Extbase. But I have a
>> problem connecting a signal to a slot in ext_localconf.php. I followed
>> the information provided at
>> http://blog.foertel.com/2011/**10/using-signalslots-in-**extbase/<http://blog.foertel.com/2011/10/using-signalslots-in-extbase/>but I get
>> an exception that the 'extbase_object' cache doesn't exist.
>>
>> Fatal error: Uncaught exception 't3lib_cache_exception_**NoSuchCache'
>> with
>> message 'A cache with identifier "extbase_object" does not exist.'
>>
>>
>> My code:
>>
>> $signalSlotDispatcher =
>> t3lib_div::makeInstance('Tx_**Extbase_Object_ObjectManager')**
>> ->get('Tx_Extbase_SignalSlot_**Dispatcher');
>>
>> $signalSlotDispatcher->**connect('SlotClass', 'slot', 'SignalClass',
>> 'method', FALSE);
>>
>> Am I missing something or is there another way to connect to a slot from
>> another extension except than in ext_localconf.php if the extension is
>> not used invoked during page rendering?
>>
>> Best regards
>> Tobias
>>
>
> ______________________________**_________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>


More information about the TYPO3-project-typo3v4mvc mailing list