예제 #1
0
 /**
  * Deletes a file
  *
  * @param Tx_Feupload_Domain_Model_File $file
  *            $file
  * @return void
  */
 public function deleteAction(Tx_Feupload_Domain_Model_File $file)
 {
     if ($file->getDeletable()) {
         $this->fileRepository->remove($file);
         $this->flashMessageContainer->add(Tx_Extbase_Utility_Localization::translate('LLL:EXT:feupload/Resources/Private/Language/locallang.xml:flash.ok.file.deleted.content'), Tx_Extbase_Utility_Localization::translate('LLL:EXT:feupload/Resources/Private/Language/locallang.xml:flash.ok.file.deleted.title'), t3lib_FlashMessage::OK);
     } else {
         $this->flashMessageContainer->add(Tx_Extbase_Utility_Localization::translate('LLL:EXT:feupload/Resources/Private/Language/locallang.xml:flash.error.file.not_deleted.content'), Tx_Extbase_Utility_Localization::translate('LLL:EXT:feupload/Resources/Private/Language/locallang.xml:flash.error.file.not_deleted.title', array($file->getTitle())), t3lib_FlashMessage::ERROR);
     }
     $this->redirect('index');
 }