Monday 30 January 2006 6:48:47 am
Hi all, I'm in a php function and I have the ID of a contentObject which represents an ezImage object. And my problem is that I'd like to know his real storage url but I don't see any simple way to do it, although it shouldn't be so difficult... I mean that when I do:
$myImageObject = eZContentObject :: fetch( 76 ); // where 76 is my contentObjectID
print_r( $myImageObject );
// displays properties but doesn't display any contained attributes.. don't know why..
// Then I can do:
print_r( $myImageObject->contentObjectAttributes() );
// to display all the object attributes..
Array {
....
[2] => ezcontentobjectattribute Object
(
...
[ID] => 266
[ContentObjectID] => 76
[Version] => 2
[LanguageCode] => fre-FR
[AttributeOriginalID] => 0
[SortKeyInt] => 0
[SortKeyString] =>
[DataTypeString] => ezimage
[DataText] => <?xml version="1.0" encoding="UTF-8"?>
<ezimage serial_number="1"
is_valid="1"
filename="geek.png"
suffix="png"
basename="geek"
dirpath="var/plain/storage/images/media/images/geek/266-2-fre-FR"
url="var/plain/storage/images/media/images/geek/266-2-fre-FR/geek.png"
original_filename="alignement_resultats.png"
mime_type="image/png"
width="1155"
height="217"
alternative_text=""
alias_key="1293033771"
timestamp="1138213887">
<original attribute_id=""
attribute_version=""
attribute_language="" />
</ezimage>
[DataInt] =>
[DataFloat] => 0
)
...
}
// Well, now I can see the storage path in the DataText field but I don't know how to access it easily (without having to parse individually, I'd like a generic method..): So is there a way to get the image storage url easily? (maybe via ezImage or imageHanler, I didn't manage with the objects tried)
Thanx for your lights, Alexandre
|