Forums / Developer / Copy Object

Copy Object

Author Message

Amine BETARI

Sunday 29 May 2011 10:40:08 am

Salam,
I'm looking into how to copy a PHP object and place it under a parent
thank you in advance

Marko Žmak

Sunday 29 May 2011 4:26:55 pm

Hi Amine, I supose you want to create a copy of an eZ Publish object in a PHP script?

Check out this tutorial:

Also take a look at the documentation for eZContentObject class:

and look for the copy() method. And note that you will have to publish the new object after you have copied it.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Amine BETARI

Wednesday 01 June 2011 12:38:23 am

Salam,
Thank you Marko, I actually saw a solution, I used the method addlocation () class ezcontentobject,
My need was multiposisionner an object, for cons I found a problem: I always like matches two new nodes of the same objects

 

Merci