kernel/classes/ezproductcollection.php
function copy()
    {
        $collection = clone $this;

        $db = eZDB::instance();
        $db->begin();
        $collection->store();

        $oldItems = $this->itemList();
        foreach ( $oldItems as $oldItem )
        {
            $item = $oldItem->copy( $collection->attribute( 'id' ) );
        }
        $db->commit();
        return $collection;
    }
function copy()
    {
        $collection = clone $this;

        $db = eZDB::instance();
        $db->begin();
        $collection->store();

        $oldItems = $this->itemList();
        foreach ( $oldItems as $oldItem )
        {
            $item = $oldItem->copy( $collection->attribute( 'id' ) );
        }
        $db->commit();
        return $collection;
    }
function copy ( ) { $ collection = clone $ this ; $ db = eZDB :: instance ( ) ; $ db -> begin ( ) ; $ collection -> store ( ) ; $ oldItems = $ this -> itemList ( ) ; foreach ( $ oldItems as $ oldItem ) { $ item = $ oldItem -> copy ( $ collection -> attribute ( 'id' ) ) ; } $ db -> commit ( ) ; return $ collection ; }
Copies the collection object, the collection items and options.

@note The new collection will already be present in the database.

@return eZProductCollection The new collection object.
Copies the collection object the collection items and options .