Forums / Developer / ObjectRelations datatype

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

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