[TYPO3-dev] Call a method after changing a data record

Philipp philippwrann at gmx.at
Fri Jul 19 14:37:51 CEST 2013


You can use your repository in your service too, just like you do in the controller...just add a property

$repository

there with a docComment like

/**
* @var \Path\To\Your\Repo
* @inject
*/
protected $repository

Then clear your cache and extbase generates a new reflectionInformation, when now instancing the repository via the objectmanager it injects the repository to your service property. This has no real influence on performance because repositories are singleton classes and are only instanced once.

just try it.



More information about the TYPO3-dev mailing list