[TYPO3-mvc] How to sort objects

Daniel Siepmann daniel.siepmann at typo3.org
Sun Jun 30 00:59:57 CEST 2013


Another way would be a ViewHelper that accepts the list of Companies.
And some more parameters like the property to list (city, country) and
the kind of sorting (asc, desc.)

This ViewHelper will get all of the properties and sort them
accordingly. Then pass them to Fluid for further usage. Or it can
extend the core f:for ViewHelper and do the job above but let you
iterate over the result.

--
Daniel Siepmann
TYPO3 Editorial Team Co-Leader

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


On Fri, Apr 12, 2013 at 10:11 AM, Stefano Cecere <scecere at krur.com> wrote:
> i would extract into an array them in the COntroller (looping the
> companies), sort them and pass them to Fluid!
>
>
> On 12/04/13 08:07, Stefan Kruse wrote:
>>
>> Hi, i have many company objects which have a 1:1 relation to country and
>> city. Now I give out a query result with all companies in a for loop. In
>> the
>> sidemenü I need a menu with all countries and cities from the companies.
>> How
>> can I now get the individual countries. This should be sorted
>> alphabetically. And should only be used once. Could  someone give me a
>> hint?
>> Thanks Stefan
>>
>
>
> --
>
> -- --- ----- -------
>
> Stefano Cecere
> KRUR studio - http://krur.com
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list