Add function to get removed files
authorJoshua Rüsweg <josh@bastelstu.be>
Thu, 31 Jan 2019 11:54:14 +0000 (12:54 +0100)
committerJoshua Rüsweg <josh@bastelstu.be>
Thu, 31 Jan 2019 11:54:14 +0000 (12:54 +0100)
See #2825

wcfsetup/install/files/lib/system/form/builder/field/UploadFormField.class.php

index 0430697c0e5c75920d9d3a8a4e316c49c63777d6..49bc645f157052dd4467b06d1eea751104c1899c 100644 (file)
@@ -88,6 +88,19 @@ class UploadFormField extends AbstractFormField {
                return UploadHandler::getInstance()->getFilesByFieldId($this->getId());
        }
        
+       /**
+        * Returns the removed files for the field. 
+        * 
+        * @param       bool    $processFiles
+        * @return      UploadFile[]
+        */
+       public function getRemovedFiles($processFiles = false) {
+               $this->registerField();
+               
+               return UploadHandler::getInstance()->getRemovedFiledByFieldId($this->getId(), $processFiles);
+       }
+       
+       
        /**
         * @inheritDoc
         */