Fetching object of a given class

Author Message

Nicolas R

Friday 13 February 2009 5:03:04 am

Hello,

I try to get a list of object of a given class but the returned array always contains all objects, not only the objects of the given class.
My fetch is:

fetch( 'content', 'list', array( 'class_filter_type' => 'MyClass', 'parent_node_id' => 629 ) );

Where am I wrong ?
Thank you !

Ivo Lukac

Friday 13 February 2009 5:17:39 am

Try it like this:

fetch( 'content', 'list', hash( 'parent_node_id', 629, 'class_filter_type', 'include', 'class_filter_array', array('MyClass') ) )

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Nicolas R

Friday 13 February 2009 5:31:58 am

It works. I misread the documentation about include/exclude !
Thank you very much !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 15:12:54
Script start
Timing: Jan 18 2025 15:12:54
Module start 'layout'
Timing: Jan 18 2025 15:12:54
Module start 'content'
Timing: Jan 18 2025 15:12:55
Module end 'content'
Timing: Jan 18 2025 15:12:55
Script end

Main resources:

Total runtime0.6381 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 587.9219152.6250
Module start 'layout' 0.00420.0028 740.546939.4453
Module start 'content' 0.00700.6295 779.9922535.3594
Module end 'content' 0.63650.0016 1,315.35168.1563
Script end 0.6381  1,323.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4717160.0002
Check MTime0.00130.2078160.0001
Mysql Total
Database connection0.00060.092010.0006
Mysqli_queries0.591592.6842570.0104
Looping result0.00050.0763550.0000
Template Total0.613596.120.3067
Template load0.00180.281820.0009
Template processing0.611795.849120.3058
Template load and register function0.00020.038210.0002
states
state_id_array0.00090.140110.0009
state_identifier_array0.00210.330020.0011
Override
Cache load0.00140.2264160.0001
Sytem overhead
Fetch class attribute can translate value0.00040.069920.0002
Fetch class attribute name0.00781.224540.0020
XML
Image XML parsing0.00050.081820.0003
class_abstraction
Instantiating content class attribute0.00000.001740.0000
General
dbfile0.00130.1965170.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs