Adding a value to a XML Block

Author Message

Kedar Deshpande

Tuesday 23 March 2010 6:22:22 am

Hi,

I have a script which adds values to a object and saves it using the createAndPublishObject method. The attributes which are text fields can be assigned as 'summary' => $summary (where $summary is a string) but this does not work with attributes which are XML Block fields.

How should a variable string be formatted so that it can be assigned to a XML Block attribute value?

thanks.

Hakim Bouras

Wednesday 24 March 2010 5:05:47 am

Hi,

You might have a look at the way it is done in : the ezpObject class (from the kernel wrapper classes which are in the test folder).

I did not yet tried it but will be interrested by your feedback, or any other alternative solution you will find.

Cheers,

Hakim Bouras
PRISMALOG - Creation de site Internet

Edit: correction of my mistake about the availability of the kernel wrapper)

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 29 2025 23:51:59
Script start
Timing: Jan 29 2025 23:51:59
Module start 'layout'
Timing: Jan 29 2025 23:51:59
Module start 'content'
Timing: Jan 29 2025 23:52:00
Module end 'content'
Timing: Jan 29 2025 23:52:00
Script end

Main resources:

Total runtime1.0344 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.1328151.2109
Module start 'layout' 0.00610.0027 739.343836.6484
Module start 'content' 0.00881.0249 775.9922463.9609
Module end 'content' 1.03370.0007 1,239.95317.8516
Script end 1.0343  1,247.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2977160.0002
Check MTime0.00130.1222160.0001
Mysql Total
Database connection0.00070.072310.0007
Mysqli_queries1.000296.7010550.0182
Looping result0.00040.0372530.0000
Template Total0.995096.220.4975
Template load0.00180.170720.0009
Template processing0.993296.018820.4966
Template load and register function0.00010.010310.0001
states
state_id_array0.00150.149310.0015
state_identifier_array0.00190.182820.0009
Override
Cache load0.00140.1350180.0001
Sytem overhead
Fetch class attribute can translate value0.00050.045320.0002
Fetch class attribute name0.00110.109930.0004
XML
Image XML parsing0.00060.057720.0003
class_abstraction
Instantiating content class attribute0.00000.000530.0000
General
dbfile0.00080.0746160.0000
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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.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: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs