Forums / Developer / ObjectRelations datatype

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..