X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c7a2d568bf693add30c8402d68d1f46f09a44c5b..refs/pull/3072/head:/app/Entities/Repos/ChapterRepo.php diff --git a/app/Entities/Repos/ChapterRepo.php b/app/Entities/Repos/ChapterRepo.php index aa9784c2d..68330dd57 100644 --- a/app/Entities/Repos/ChapterRepo.php +++ b/app/Entities/Repos/ChapterRepo.php @@ -1,19 +1,19 @@ -priority = (new BookContents($parentBook))->getLastPriority() + 1; $this->baseRepo->create($chapter, $input); Activity::addForEntity($chapter, ActivityType::CHAPTER_CREATE); + return $chapter; } @@ -59,19 +61,13 @@ class ChapterRepo { $this->baseRepo->update($chapter, $input); Activity::addForEntity($chapter, ActivityType::CHAPTER_UPDATE); - return $chapter; - } - /** - * Update the permissions of a chapter. - */ - public function updatePermissions(Chapter $chapter, bool $restricted, Collection $permissions = null) - { - $this->baseRepo->updatePermissions($chapter, $restricted, $permissions); + return $chapter; } /** * Remove a chapter from the system. + * * @throws Exception */ public function destroy(Chapter $chapter) @@ -85,7 +81,8 @@ class ChapterRepo /** * Move the given chapter into a new parent book. * The $parentIdentifier must be a string of the following format: - * 'book:' (book:5) + * 'book:' (book:5). + * * @throws MoveOperationException */ public function move(Chapter $chapter, string $parentIdentifier): Book