Added navbar and button to skip automatic search of book info online.
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Service;
|
||||
use App\Entity\Book;
|
||||
use App\Entity\File;
|
||||
use App\Repository\FileRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
@@ -23,11 +24,15 @@ class FileService
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $files
|
||||
* @param Collection|File $files
|
||||
* @return void
|
||||
*/
|
||||
public function removeFiles(Collection $files)
|
||||
public function removeFiles(Collection|File $files)
|
||||
{
|
||||
if (!$files instanceof Collection) {
|
||||
$files = new ArrayCollection([$files]);
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
$this->fileSystem->remove($this->getFilePath($file));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user