Forums / Developer / Adding a value to a XML Block

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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)