How can I make custom fetch sorting method?

Author Message

Daniele Nocentini

Wednesday 17 February 2010 6:28:16 am

I have a fetch tree function for extract data from ez content objects like this:

{def $nodes=fetch( 'content', 'tree', hash( 'parent_node_id', 157,
'class_filter_type', 'include',
'class_filter_array', array('position'),
'attribute_filter', array(array( 643, 'like', $node.data_map.name.content )),
'sort_by', array('path_string', false())
))}

it's works perfect for me but I wuold like to make custom sorting method by a date attribute from parent class object for the single objects found in a tree.

How can I make this?

Antica Bottega Digitale srl
http://www.abd.it

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 04:55:26
Script start
Timing: Jan 18 2025 04:55:26
Module start 'layout'
Timing: Jan 18 2025 04:55:26
Module start 'content'
Timing: Jan 18 2025 04:55:27
Module end 'content'
Timing: Jan 18 2025 04:55:27
Script end

Main resources:

Total runtime1.0574 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.0469152.6406
Module start 'layout' 0.00460.0025 740.687539.4766
Module start 'content' 0.00711.0489 780.1641463.0000
Module end 'content' 1.05600.0014 1,243.16418.1250
Script end 1.0574  1,251.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.3138160.0002
Check MTime0.00140.1336160.0001
Mysql Total
Database connection0.00070.067010.0007
Mysqli_queries1.015296.0139460.0221
Looping result0.00040.0367440.0000
Template Total1.031397.520.5156
Template load0.00240.231420.0012
Template processing1.028897.295220.5144
Template load and register function0.00010.010810.0001
states
state_id_array0.00070.064810.0007
state_identifier_array0.00120.109220.0006
Override
Cache load0.00180.1740130.0001
Sytem overhead
Fetch class attribute can translate value0.00100.090310.0010
Fetch class attribute name0.00080.072520.0004
XML
Image XML parsing0.00260.241210.0026
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00350.3301160.0002
String conversion0.00000.000840.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs