[TYPO3-english] Constructor injection not working after serializing+deserializing an object?

Jan Kornblum jan.kornblum at gmx.de
Sun Jul 19 22:10:27 CEST 2015

Hi David,

> Using __construct in extbase is usually not advised.

But it is advised here:

> Instead you should use  initializeObject(), initializeAction(), or
> initializeYourActionName().

I need to automatically instance the object manager in my class after 
it has been unserialized (please have a look at my example). I don't 
want to manually inject the object manager "from outside" (e.g. the 
calling controller action).

> Sometimes you even never need those functions as some basics are already
> setup anyway.
> Have a look in the classes you extend.

Yes, sometimes. But even @inject doesn't work when my object has been 
unserialized ;) Why?

Kind regards, Jan

More information about the TYPO3-english mailing list