Forums / Developer / Creating a new version of a content object (in PHP)

Creating a new version of a content object (in PHP)

Author Message

Tom Couwberghs

Tuesday 04 November 2003 11:46:20 pm

Hi all,

I'm using the code described in http://www.ez.no/developer/ez_publish_3/forum/developer/creating_a_simple_content_object_via_php to import external user data into custom userobjects. So far so good, al seems to be working fine.

Here's my problem: we would like eZPublish to manage different versions of these user objects because we need historical data on users frow now on. For example: we need to know what department an employee was in five years ago.

I know this can be done easily by eZP, by using version management, but I'm not sure on how to create a new version of a contentobject with PHP.

Does anybody know how to do this?

Thanks in advance,

Tom

Tom Couwberghs

Thursday 06 November 2003 2:54:28 am

Another more difficult question:

I've imported our organigram structure into eZP. We would like to keep historical data from the organigram too. For this we need to store the node placements of each objectversion as units can move in the organigram during their existance.

I did some research, and if I'm correct, then eZP just overwrites the node placement in the table eZContentObject_Tree when a new version is created.

Could anybody confirm if I'm right with this?
How would you handle this problem?

All comments and thoughts are very much appreciated.