Converting attributes to eZMatrix

Author Message

Peter Putzer

Friday 19 December 2008 12:23:48 am

Hi!

Has anyone got some example code modifying every object of a certain class (via the PHP API)?

I have some author information stored in four attributes at the moment: an author list and three strings to add "position" information for the first three authors.The whole setup is rather old, and well, back then it seemed like the simplest idea ;-)

Anyway, now I want to replace these attributes with a single eZMatrix, which I've already added to the class definition. The conversion scripts supplied with various eZ Publish releases seem mostly concerned with a class level attribute change, which is not necessary here - I simply need to examine each object, fill one of the attributes with information from another one and store object again.

Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at

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 30 2025 22:27:43
Script start
Timing: Jan 30 2025 22:27:43
Module start 'layout'
Timing: Jan 30 2025 22:27:43
Module start 'content'
Timing: Jan 30 2025 22:27:43
Module end 'content'
Timing: Jan 30 2025 22:27:43
Script end

Main resources:

Total runtime0.0207 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.1406151.2109
Module start 'layout' 0.00520.0032 739.3516220.7031
Module start 'content' 0.00840.0110 960.0547997.7109
Module end 'content' 0.01940.0013 1,957.765629.9922
Script end 0.0207  1,987.7578 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.7144140.0002
Check MTime0.00104.8901140.0001
Mysql Total
Database connection0.00094.145710.0009
Mysqli_queries0.002210.858430.0007
Looping result0.00000.048310.0000
Template Total0.00094.310.0009
Template load0.00073.436910.0007
Template processing0.00020.883710.0002
Override
Cache load0.00052.272510.0005
General
dbfile0.00052.281780.0001
String conversion0.00000.028840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs