concrete/src/Page/Collection/Collection.php
public function relateVersionEdits($oc)
    {
        $db = Loader::db();
        $v = [
            $this->getCollectionID(),
            $this->getVersionID(),
            $oc->getCollectionID(),
            $oc->getVersionID(),
        ];
        $r = $db->GetOne(
                'select count(*) from CollectionVersionRelatedEdits where cID = ? and cvID = ? and cRelationID = ? and cvRelationID = ?',
                $v
        );
        if ($r > 0) {
            return false;
        } else {
            $db->Execute(
               'insert into CollectionVersionRelatedEdits (cID, cvID, cRelationID, cvRelationID) values (?, ?, ?, ?)',
               $v
            );
        }
    }
public function relateVersionEdits($oc)
    {
        $db = Loader::db();
        $v = [
            $this->getCollectionID(),
            $this->getVersionID(),
            $oc->getCollectionID(),
            $oc->getVersionID(),
        ];
        $r = $db->GetOne(
                'select count(*) from CollectionVersionRelatedEdits where cID = ? and cvID = ? and cRelationID = ? and cvRelationID = ?',
                $v
        );
        if ($r > 0) {
            return false;
        } else {
            $db->Execute(
               'insert into CollectionVersionRelatedEdits (cID, cvID, cRelationID, cvRelationID) values (?, ?, ?, ?)',
               $v
            );
        }
    }
public function relateVersionEdits ( $ oc ) { $ db = Loader :: db ( ) ; $ v = [ $ this -> getCollectionID ( ) , $ this -> getVersionID ( ) , $ oc -> getCollectionID ( ) , $ oc -> getVersionID ( ) , ] ; $ r = $ db -> GetOne ( 'select count(*) from CollectionVersionRelatedEdits where cID = ? and cvID = ? and cRelationID = ? and cvRelationID = ?' , $ v ) ; if ( $ r > 0 ) { return false ; } else { $ db -> Execute ( 'insert into CollectionVersionRelatedEdits (cID, cvID, cRelationID, cvRelationID) values (?, ?, ?, ?)' , $ v ) ; } }
Associate the edits of another collection to this collection.

@param \Concrete\Core\Page\Collection\Collection $oc the collection that has been modified

@return null|false return false if the other collection is already associated to this collection, NULL otherwise

@example If a global area is modified inside this collection, you need to call $page->relateVersionEdits($globalArea)
Associate the edits of another collection to this collection .