public function deleteItemContent(core_kernel_classes_Resource $item)
    {
        // Delete item directory from filesystem
        $definitonFileValues = $item->getPropertyValues($this->itemContentProperty);
        if (!empty($definitonFileValues)) {
            /** @var Directory $directory */
            $directory = $this->getFileReferenceSerializer()->unserializeDirectory(reset($definitonFileValues));
            if ($directory->exists()) {
                $directory->deleteSelf();
            }
        }

        //delete the folder for all languages!
        foreach ($item->getUsedLanguages($this->itemContentProperty) as $lang) {
            $files = $item->getPropertyValuesByLg($this->itemContentProperty, $lang);
            foreach ($files->getIterator() as $file) {
                if ($file instanceof core_kernel_classes_Resource) {
                    $this->getFileReferenceSerializer()->cleanUp($file->getUri());
                }
            }
        }

        return true;
    }
public function deleteItemContent(core_kernel_classes_Resource $item)
    {
        // Delete item directory from filesystem
        $definitonFileValues = $item->getPropertyValues($this->itemContentProperty);
        if (!empty($definitonFileValues)) {
            /** @var Directory $directory */
            $directory = $this->getFileReferenceSerializer()->unserializeDirectory(reset($definitonFileValues));
            if ($directory->exists()) {
                $directory->deleteSelf();
            }
        }

        //delete the folder for all languages!
        foreach ($item->getUsedLanguages($this->itemContentProperty) as $lang) {
            $files = $item->getPropertyValuesByLg($this->itemContentProperty, $lang);
            foreach ($files->getIterator() as $file) {
                if ($file instanceof core_kernel_classes_Resource) {
                    $this->getFileReferenceSerializer()->cleanUp($file->getUri());
                }
            }
        }

        return true;
    }
public function deleteItemContent ( core_kernel_classes_Resource $ item ) { // Delete item directory from filesystem $ definitonFileValues = $ item -> getPropertyValues ( $ this -> itemContentProperty ) ; if ( ! empty ( $ definitonFileValues ) ) { /** @var Directory $directory */ $ directory = $ this -> getFileReferenceSerializer ( ) -> unserializeDirectory ( reset ( $ definitonFileValues ) ) ; if ( $ directory -> exists ( ) ) { $ directory -> deleteSelf ( ) ; } } //delete the folder for all languages! foreach ( $ item -> getUsedLanguages ( $ this -> itemContentProperty ) as $ lang ) { $ files = $ item -> getPropertyValuesByLg ( $ this -> itemContentProperty , $ lang ) ; foreach ( $ files -> getIterator ( ) as $ file ) { if ( $ file instanceof core_kernel_classes_Resource ) { $ this -> getFileReferenceSerializer ( ) -> cleanUp ( $ file -> getUri ( ) ) ; } } } return true ; }
Deletes the content but does not unreference it

@access public
@author Joel Bout, <joel@taotesting.com>
@param  core_kernel_classes_Resource item
@return boolean
Deletes the content but does not unreference it