src/wcmf/application/controller/RESTController.php
public function deleteInRelation() {
    $this->requireTransaction();
    $request = $this->getRequest();

    // remove existing object from relation
    $request->setValue('role', $request->getValue('relation'));

    // delegate to AssociateController
    $subResponse = $this->executeSubAction('disassociate');

    // prevent commit
    if ($subResponse->hasErrors()) {
      $this->endTransaction(false);
    }
    $this->handleSubResponse($subResponse);
  }
public function deleteInRelation() {
    $this->requireTransaction();
    $request = $this->getRequest();

    // remove existing object from relation
    $request->setValue('role', $request->getValue('relation'));

    // delegate to AssociateController
    $subResponse = $this->executeSubAction('disassociate');

    // prevent commit
    if ($subResponse->hasErrors()) {
      $this->endTransaction(false);
    }
    $this->handleSubResponse($subResponse);
  }
public function deleteInRelation ( ) { $ this -> requireTransaction ( ) ; $ request = $ this -> getRequest ( ) ; // remove existing object from relation $ request -> setValue ( 'role' , $ request -> getValue ( 'relation' ) ) ; // delegate to AssociateController $ subResponse = $ this -> executeSubAction ( 'disassociate' ) ; // prevent commit if ( $ subResponse -> hasErrors ( ) ) { $ this -> endTransaction ( false ) ; } $ this -> handleSubResponse ( $ subResponse ) ; }
Remove an object from a relation

| Parameter        | Description
|------------------|-------------------------
| _in_ `language`  | The language of the object
| _in_ `className` | Type of object to delete
| _in_ `id`        | Id of object to delete
| _in_ `relation`  | Name of the relation to the object defined by _sourceId_ (determines the type of the deleted object)
| _in_ `sourceId`  | Id of the object to which the deleted object is related (determines the object id together with _className_)
| _in_ `targetId`  | Id of the object to be deleted from the relation (determines the object id together with _relation_)
Remove an object from a relation