Forums / Developer / get the list of objects

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

get the list of objects

Author Message

Bass The Butcher

Sunday 27 July 2008 4:44:29 am

Hi all,

I need to get a list of objects of particular class and particular owner within PHP code, not template.
For example I need to delete all articles of user with id:12.

Thanks.

Pascal Specht

Monday 28 July 2008 9:19:53 am

Hi,

I would use the fetch function, like this (exemple, get all products):

$list = eZContentObjectTreeNode::subTree( array( 'Depth' => 100,
											 'ClassFilterType' => 'include',
											 'ClassFilterArray' => array('product') ), 2 );

and then loop through the objects looking ofr their creator ID or placement, to find out who they belong to.

Hope this helps,
Cheers,

</Pascal>