[TYPO3-dev] FlexForm with itemsProcFunc using ExtBase Repository

Christian Ludwig cl at viazenetti.de
Fri May 9 15:27:44 CEST 2014


Hi Xavier,

Thanks for this hint, much better than using new :) 

An idea on how to get a repository injected by flexform user functions
like it is done in controllers?

Greetings
Christian

-----Original Message-----
From: typo3-dev-bounces at lists.typo3.org
[mailto:typo3-dev-bounces at lists.typo3.org] On Behalf Of Xavier
Perseguers
Sent: Friday, May 09, 2014 1:41 PM
To: typo3-dev at lists.typo3.org
Subject: Re: [TYPO3-dev] FlexForm with itemsProcFunc using ExtBase
Repository

Hi Christian,

> $this->objectManager = 
> TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase
> \Object\ObjectManager') $this->trainerRepository = new 
> Tx_Myclass_Domain_Repository_TrainerRepository();

Never ever use "new" (this is not "new" though) :)

$this->trainerRepository =
$this->objectManager->get('Tx_Myclass_Domain_Repository_TrainerRepositor
y');

> $list = $this->trainerRepository->findAll($this->objectManager);

You should not need to pass anything to findAll()

Cheers

--
Xavier Perseguers
TYPO3 CMS Team Member

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org

_______________________________________________
TYPO3-dev mailing list
TYPO3-dev at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev






More information about the TYPO3-dev mailing list