How can I know a class id?

Author Message

Pavel Konovalov

Monday 27 November 2006 9:29:58 am

Hi 2 all!
I have a trouble when I want to get the 'id' of any class.
How can I do this, if i know only a class identificator.
I want to do it in the php code.

Are you gangsters?!
No, we are Russians.

Kristian Hole

Monday 27 November 2006 9:37:04 am

Hi Pavel,

In PHP, it will be something like this:

 


$class = eZContentClass::fetchByIdentifier( 'myclass' );
if (is_object( $class ) )
{
    echo "class id:" . $cøass->attribute('id');
}
else
{
   echo "no such class";
}
 

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Pavel Konovalov

Monday 27 November 2006 10:04:33 am

Hi Kristian!
Thx for your reply.
I solve my problem.

Are you gangsters?!
No, we are Russians.

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 20:52:43
Script start
Timing: Jan 18 2025 20:52:43
Module start 'layout'
Timing: Jan 18 2025 20:52:43
Module start 'content'
Timing: Jan 18 2025 20:52:44
Module end 'content'
Timing: Jan 18 2025 20:52:44
Script end

Main resources:

Total runtime1.0630 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.0046 587.9141152.6250
Module start 'layout' 0.00460.0027 740.539139.4453
Module start 'content' 0.00731.0543 779.9844536.7969
Module end 'content' 1.06160.0014 1,316.781312.1641
Script end 1.0630  1,328.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2887160.0002
Check MTime0.00130.1213160.0001
Mysql Total
Database connection0.00060.054510.0006
Mysqli_queries1.017695.7306570.0179
Looping result0.00040.0415550.0000
Template Total1.037497.620.5187
Template load0.00210.199720.0011
Template processing1.035297.386520.5176
Template load and register function0.00010.012710.0001
states
state_id_array0.00080.075410.0008
state_identifier_array0.00090.082620.0004
Override
Cache load0.00180.1655190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.049120.0003
Fetch class attribute name0.00080.079450.0002
XML
Image XML parsing0.00220.203220.0011
class_abstraction
Instantiating content class attribute0.00000.001160.0000
General
dbfile0.00220.2041220.0001
String conversion0.00000.000740.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs