[TYPO3-english] problem after update to 6.2 with extension

Markus Klein klein.t3 at mfc-linz.at
Fri Mar 28 09:14:12 CET 2014


Well, actually this is overhead again, since every Controller already has the object manager at hand.
Look into the AbstractController (the one your Controller is extending).

Btw: use $this->objectManager->get() instead of create() (create is deprecated since 6.1)

Still I'm wondering why @inject is not working for you.

Kind regards
Markus

------------------------------------------------------------
Markus Klein
TYPO3 CMS Active Contributors Team Member

> -----Original Message-----
> From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-
> bounces at lists.typo3.org] On Behalf Of andreas
> Sent: Thursday, March 27, 2014 10:31 PM
> To: typo3-english at lists.typo3.org
> Subject: [TYPO3-english] Re: problem after update to 6.2 with extension
> 
> well, i am not that deep in the code.
> 
> thank you for your help. it works for me like:
> 
> /**
>  * @var \TYPO3\CMS\Extbase\Object\ObjectManager
>  */
> protected $objectManager;
> 
> /**
>  * Constructor
>  */
> public function __construct() {
> 	$this->objectManager =
> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbas
> e\Object\ObjectManager');
> }
> 
> and with
> 
> $xyRepository = $this->objectManager-
> >create('Ce\\CeContent\\Domain\\Repository\\xy'Repository');
> 
> i can get the data. nice. well, i begin to like 6.2.
> 
> thank you.
> 
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list