[TYPO3-mvc] Fluid: form.select view helper and empty default item

Simon Schaufelberger schaufelREMOVE-MEberger at punkt.de
Mon Feb 7 15:31:21 CET 2011


awesome, thanx!

Am 07.02.2011 14:51, schrieb Franz Koch:
> Hey,
>
>>> $this->view->assign('categories', array_merge(array(0 => 'All
>>> Categories'), $this->categoryRepository->findAll()));
>>
>> this doesn't work in TYPO3 4.5 any more.
>> i get:
>>> PHP Warning: array_merge() [<a
>>> href='function.array-merge'>function.array-merge</a>]: Argument #2 is
>>> not an array in [...]
>>
>> the type that i get back is:
>> Tx_Extbase_Persistence_QueryResultInterface wich array_merge can't
>> handle.
>
> then convert it to an array:
>
> $this->categoryRepository->findAll()->toArray();
>
>

-- 
Kind regards,

Schaufi from punkt.de


More information about the TYPO3-project-typo3v4mvc mailing list