kernel/private/classes/webdav/ezwebdavcontentbackend.php
protected function deleteContent( $currentSite, $virtualFolder, $target )
    {
        $nodePath = $this->internalNodePath( $virtualFolder, $target );
        $node = $this->fetchNodeByTranslation( $nodePath );

        if ( $node === null )
        {
            return false; // @as self::FAILED_NOT_FOUND;
        }

        // Can we delete the node?
        if ( !$node->canRead() or
             !$node->canRemove() )
        {
            return false; // @as self::FAILED_FORBIDDEN;
        }

        // added by @as: use the content.ini setting for handling delete: 'delete' or 'trash'
        // default is 'trash'
        $contentINI = eZINI::instance( 'content.ini' );
        $removeAction = $contentINI->hasVariable( 'RemoveSettings', 'DefaultRemoveAction' ) ?
                        $contentINI->variable( 'RemoveSettings', 'DefaultRemoveAction' ) : 'trash';

        if ( $removeAction !== 'trash' && $removeAction !== 'delete' )
        {
            // default remove action is to trash
            $removeAction = 'trash';
        }

        $moveToTrash = ( $removeAction === 'trash' ) ? true : false;

        $node->removeNodeFromTree( $moveToTrash );
        return true; // @as self::OK;
    }
protected function deleteContent( $currentSite, $virtualFolder, $target )
    {
        $nodePath = $this->internalNodePath( $virtualFolder, $target );
        $node = $this->fetchNodeByTranslation( $nodePath );

        if ( $node === null )
        {
            return false; // @as self::FAILED_NOT_FOUND;
        }

        // Can we delete the node?
        if ( !$node->canRead() or
             !$node->canRemove() )
        {
            return false; // @as self::FAILED_FORBIDDEN;
        }

        // added by @as: use the content.ini setting for handling delete: 'delete' or 'trash'
        // default is 'trash'
        $contentINI = eZINI::instance( 'content.ini' );
        $removeAction = $contentINI->hasVariable( 'RemoveSettings', 'DefaultRemoveAction' ) ?
                        $contentINI->variable( 'RemoveSettings', 'DefaultRemoveAction' ) : 'trash';

        if ( $removeAction !== 'trash' && $removeAction !== 'delete' )
        {
            // default remove action is to trash
            $removeAction = 'trash';
        }

        $moveToTrash = ( $removeAction === 'trash' ) ? true : false;

        $node->removeNodeFromTree( $moveToTrash );
        return true; // @as self::OK;
    }
protected function deleteContent ( $ currentSite , $ virtualFolder , $ target ) { $ nodePath = $ this -> internalNodePath ( $ virtualFolder , $ target ) ; $ node = $ this -> fetchNodeByTranslation ( $ nodePath ) ; if ( $ node === null ) { return false ; // @as self::FAILED_NOT_FOUND; } // Can we delete the node? if ( ! $ node -> canRead ( ) or ! $ node -> canRemove ( ) ) { return false ; // @as self::FAILED_FORBIDDEN; } // added by @as: use the content.ini setting for handling delete: 'delete' or 'trash' // default is 'trash' $ contentINI = eZINI :: instance ( 'content.ini' ) ; $ removeAction = $ contentINI -> hasVariable ( 'RemoveSettings' , 'DefaultRemoveAction' ) ? $ contentINI -> variable ( 'RemoveSettings' , 'DefaultRemoveAction' ) : 'trash' ; if ( $ removeAction !== 'trash' && $ removeAction !== 'delete' ) { // default remove action is to trash $ removeAction = 'trash' ; } $ moveToTrash = ( $ removeAction === 'trash' ) ? true : false ; $ node -> removeNodeFromTree ( $ moveToTrash ) ; return true ; // @as self::OK; }
Handles deletion on the content tree level.

It will try to find the node with the path $target and then try to
remove it (ie. move to trash) if the user is allowed.

@param string $currentSite Eg. 'plain_site_user'
@param string $virtualFolder Eg. 'Content'
@param string $target Eg. 'Folder1/file1.txt'
@return bool
Handles deletion on the content tree level .