main/app/API/Crud.php
public function delete($object, array $options = [])
    {
        $this->checkPermission('DELETE', $object, [], true);

        if ($this->dispatch('delete', 'pre', [$object, $options])) {
            if (!in_array(Options::SOFT_DELETE, $options)) {
                $this->om->remove($object);
                $this->om->flush();
            }
            $this->dispatch('delete', 'post', [$object, $options]);
        }
    }
public function delete($object, array $options = [])
    {
        $this->checkPermission('DELETE', $object, [], true);

        if ($this->dispatch('delete', 'pre', [$object, $options])) {
            if (!in_array(Options::SOFT_DELETE, $options)) {
                $this->om->remove($object);
                $this->om->flush();
            }
            $this->dispatch('delete', 'post', [$object, $options]);
        }
    }
public function delete ( $ object , array $ options = [ ] ) { $ this -> checkPermission ( 'DELETE' , $ object , [ ] , true ) ; if ( $ this -> dispatch ( 'delete' , 'pre' , [ $ object , $ options ] ) ) { if ( ! in_array ( Options :: SOFT_DELETE , $ options ) ) { $ this -> om -> remove ( $ object ) ; $ this -> om -> flush ( ) ; } $ this -> dispatch ( 'delete' , 'post' , [ $ object , $ options ] ) ; } }
Deletes an entry `object`.

@param object $object  - the entity to delete
@param array  $options - additional delete options
Deletes an entry object .