Author Topic

Nicolas Pastorino

Monday 19 April 2010 12:26:22 am

Comment58532

Ok, got it.

I'd go for a custom fetch function here, overriding the content/list one (to preserve the many useful parameters ), going as follows :

  1. Run the content/list fetch function from PHP ( use the magic eZFunctionHandler::execute(...) ) with 'as_object' [1] set to false --> performances performances.
  2. Loop over the results, building an intermediate associative array, with contentobject IDs as keys. Will automatically filter out duplicates object IDs by overriding the keys.
  3. Return the array values, or replace them by fetched eZContentObjectTreeNode objects, on a one-by-one basis.

Hope it helps !
Cheers,

[1] : http://ez.no/doc/ez_publish/technical_manual/4_x/reference/modules/content/fetch_functions/list

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye