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.