Ezdesign and ezimage operators in php ?

Author Message

H-Works Agency

Monday 27 October 2008 2:44:21 am

Is there a php function corresponding to "ezimage" and "ezdesign" (find an image in siteaccesses design list), "ezurl", "ezroot" template operators ?

I tried to investigate source code but couldn't find anything.

This would allow us to reference images, or tpl inside php script without the need to put full path which could be very long.

Thanx in advance,
Martin

EZP is Great

H-Works Agency

Thursday 01 July 2010 3:28:07 am

For information i think this is it :

$tpl = templateInit();

$strPath = ezUrlOperator::eZImage($tpl, 'icons/mypicture.jpg', '');

$results['img'] = 'http://' . eZSys::hostname() . $strPath;

With : 'icons/mypicture.jpg' in your design's images directory.

OR

eZURLOperator::eZDesign() if you want to search a tpl path

EZP is Great

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 11:32:53
Script start
Timing: Jan 18 2025 11:32:53
Module start 'layout'
Timing: Jan 18 2025 11:32:53
Module start 'content'
Timing: Jan 18 2025 11:32:54
Module end 'content'
Timing: Jan 18 2025 11:32:54
Script end

Main resources:

Total runtime0.7991 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 589.1328152.6250
Module start 'layout' 0.00710.0036 741.757839.4453
Module start 'content' 0.01070.7869 781.2031486.4453
Module end 'content' 0.79760.0015 1,267.64848.1563
Script end 0.7991  1,275.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5229160.0003
Check MTime0.00190.2411160.0001
Mysql Total
Database connection0.00130.162110.0013
Mysqli_queries0.746893.4590520.0144
Looping result0.00080.1007500.0000
Template Total0.758294.920.3791
Template load0.00230.293120.0012
Template processing0.755894.585820.3779
Template load and register function0.00010.012010.0001
states
state_id_array0.00100.125010.0010
state_identifier_array0.00200.246320.0010
Override
Cache load0.00190.2332180.0001
Sytem overhead
Fetch class attribute can translate value0.00180.229710.0018
Fetch class attribute name0.00150.184230.0005
XML
Image XML parsing0.00040.055410.0004
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00090.1078170.0001
String conversion0.00000.001440.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
2content/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
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/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: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs