mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-01 05:51:52 +08:00
Started implementation of recycle bin functionality
This commit is contained in:
@ -123,12 +123,11 @@ class BookRepo
|
||||
|
||||
/**
|
||||
* Remove a book from the system.
|
||||
* @throws NotifyException
|
||||
* @throws BindingResolutionException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function destroy(Book $book)
|
||||
{
|
||||
$trashCan = new TrashCan();
|
||||
$trashCan->destroyBook($book);
|
||||
$trashCan->softDestroyBook($book);
|
||||
}
|
||||
}
|
||||
|
@ -174,6 +174,6 @@ class BookshelfRepo
|
||||
public function destroy(Bookshelf $shelf)
|
||||
{
|
||||
$trashCan = new TrashCan();
|
||||
$trashCan->destroyShelf($shelf);
|
||||
$trashCan->softDestroyShelf($shelf);
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,7 @@ use BookStack\Entities\Managers\BookContents;
|
||||
use BookStack\Entities\Managers\TrashCan;
|
||||
use BookStack\Exceptions\MoveOperationException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Exceptions\NotifyException;
|
||||
use Exception;
|
||||
use Illuminate\Contracts\Container\BindingResolutionException;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class ChapterRepo
|
||||
@ -19,7 +16,6 @@ class ChapterRepo
|
||||
|
||||
/**
|
||||
* ChapterRepo constructor.
|
||||
* @param $baseRepo
|
||||
*/
|
||||
public function __construct(BaseRepo $baseRepo)
|
||||
{
|
||||
@ -77,7 +73,7 @@ class ChapterRepo
|
||||
public function destroy(Chapter $chapter)
|
||||
{
|
||||
$trashCan = new TrashCan();
|
||||
$trashCan->destroyChapter($chapter);
|
||||
$trashCan->softDestroyChapter($chapter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@ use BookStack\Exceptions\MoveOperationException;
|
||||
use BookStack\Exceptions\NotFoundException;
|
||||
use BookStack\Exceptions\NotifyException;
|
||||
use BookStack\Exceptions\PermissionsException;
|
||||
use Exception;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
@ -259,12 +260,12 @@ class PageRepo
|
||||
|
||||
/**
|
||||
* Destroy a page from the system.
|
||||
* @throws NotifyException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function destroy(Page $page)
|
||||
{
|
||||
$trashCan = new TrashCan();
|
||||
$trashCan->destroyPage($page);
|
||||
$trashCan->softDestroyPage($page);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user