ObjectRelations datatype

Author Message

Lars Eirik R

Monday 31 May 2010 7:36:03 am

Hi.

I need to figure out how to relate an object of mine to a class using an object Relations datatype.

I have been trying to figure out how to use the api but i am not able to fully make it work.

Sine pretty much every instance returns an array with neste arrays its somewhat hard to figure out which functions to call on the objects.

I would like to be abel to do something similar to this:

$ezObj = eZContentObject::fetch("166"); //myid
$dataMap = $ezObj->dataMap();
$mediaList = $dataMap["mediaelements"]; //mylist
$object = eZContentClassAttribute::fetch(376);

$object->appendObject(170) //I assume that the fetch with ezContentClassAttribute is wrong..

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

Main resources:

Total runtime0.0299 sec
Peak memory usage6,144.0000 KB
Database Queries3

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.0053 739.3438220.6875
Module start 'content' 0.01140.0168 960.0313993.7891
Module end 'content' 0.02810.0017 1,953.820329.9922
Script end 0.0299  1,983.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003110.3879140.0002
Check MTime0.00123.9152140.0001
Mysql Total
Database connection0.00072.340710.0007
Mysqli_queries0.003311.191530.0011
Looping result0.00000.050210.0000
Template Total0.00124.210.0012
Template load0.00103.279810.0010
Template processing0.00030.859410.0003
Override
Cache load0.00072.308010.0007
General
dbfile0.00206.614680.0002
String conversion0.00000.032740.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