But I can make the solution for object relation list work, I use a code similar to your suggestion and when I print out the content of $content['relation_list']
$cli->output(print_r($content['relation_list']));
the array is complete and it seems to work,
but when I come bakc to the admin interface, the object is created without the object relation list.
Hi Kristoff,
here is the result of $cli->output(print_r($content)); after adding relations, it seems that $content['relation_list'] is updated (like I want) but in the admin interface I can see no relations.
ofcourse, to use eZObjectRelationListType::appendObject you need to have included /kernel/classes/datatypes/ezobjectrelationlist/ezobjectrelationlisttype.php somewhere.
it seems rare to include that file directly. more often, people seem to include
include_once( 'kernel/classes/ezdatatype.php' );
and do something like
eZDataType::loadAndRegisterAllTypes();
which includes ezobjectrelationlisttype.php if it is a valid type.
$2c, *pike
PS. the print_r output of Fabio Carissimi seems ok. The object get's included in $content['relation_list'][0]['object'] by the appendObject call.
---------------
The class eZContentObjectTreeNode does.