Object max version

Author Message

Pavel Konovalov

Tuesday 28 November 2006 9:54:56 am

Hello
Suggest please.
How can I find the maximal version of object in PHP code?

Are you gangsters?!
No, we are Russians.

Claudia Kosny

Wednesday 29 November 2006 1:37:36 pm

Hi Pavel

Not sure whether this helps:
$contentobject->versions() returns an array with all available contentobjectversions of $contentobject.

If you just need to know how many versions an object can have you need to check the content.ini, as this is set there.

As you seem to work quite a lot with PHP code you should check the file \kernel\classes\ezcontentobject.php and read over the function names to get an idea what is available there. Usually the code is quite good to understand.

Claudia

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 22:30:07
Script start
Timing: Jan 18 2025 22:30:07
Module start 'layout'
Timing: Jan 18 2025 22:30:07
Module start 'content'
Timing: Jan 18 2025 22:30:08
Module end 'content'
Timing: Jan 18 2025 22:30:08
Script end

Main resources:

Total runtime0.7069 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.7969152.6094
Module start 'layout' 0.00660.0032 740.406339.4297
Module start 'content' 0.00980.6956 779.8359519.9297
Module end 'content' 0.70540.0014 1,299.76568.1875
Script end 0.7068  1,307.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4920160.0002
Check MTime0.00140.1995160.0001
Mysql Total
Database connection0.00120.172910.0012
Mysqli_queries0.658893.2014540.0122
Looping result0.00050.0725520.0000
Template Total0.669294.720.3346
Template load0.00210.292020.0010
Template processing0.667194.376920.3336
Template load and register function0.00010.017410.0001
states
state_id_array0.00070.098610.0007
state_identifier_array0.00170.236120.0008
Override
Cache load0.00170.2409140.0001
Sytem overhead
Fetch class attribute can translate value0.00180.250420.0009
Fetch class attribute name0.00160.219830.0005
XML
Image XML parsing0.00060.084220.0003
class_abstraction
Instantiating content class attribute0.00000.000830.0000
General
dbfile0.00070.1020160.0000
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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs