From 257a5a23ecaf7ce779969d575ff8a0b976181d13 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Tue, 25 Sep 2018 16:58:03 +0100 Subject: [PATCH] Fleshed out entity provided and optimized imports --- app/Actions/ActivityService.php | 1 - app/Actions/CommentRepo.php | 1 - app/Actions/TagRepo.php | 2 +- app/Auth/Access/EmailConfirmationService.php | 6 +- app/Auth/Access/LdapService.php | 5 +- app/Auth/Access/SocialAuthService.php | 10 +-- app/Auth/Permissions/JointPermission.php | 2 +- app/Auth/Permissions/PermissionService.php | 7 +- app/Auth/Permissions/PermissionsRepo.php | 5 +- app/Auth/Role.php | 1 - app/Auth/SocialAccount.php | 1 - app/Auth/User.php | 4 +- app/Auth/UserRepo.php | 2 - app/Entities/Book.php | 1 - app/Entities/Chapter.php | 4 - app/Entities/Entity.php | 4 +- app/Entities/EntityProvider.php | 75 ++++++++++++++++++- app/Entities/EntityRepo.php | 13 +--- app/Entities/ExportService.php | 7 +- app/Entities/Page.php | 4 - app/Entities/PageRevision.php | 3 +- app/Entities/SearchService.php | 6 -- app/Exceptions/Handler.php | 10 +-- app/Http/Controllers/AttachmentController.php | 6 +- app/Http/Controllers/Auth/LoginController.php | 6 +- .../Controllers/Auth/RegisterController.php | 14 ++-- app/Http/Controllers/BookController.php | 2 +- app/Http/Controllers/BookshelfController.php | 3 +- app/Http/Controllers/ChapterController.php | 2 +- app/Http/Controllers/Controller.php | 4 +- app/Http/Controllers/HomeController.php | 1 - app/Http/Controllers/ImageController.php | 7 +- app/Http/Controllers/PageController.php | 6 +- app/Http/Controllers/PermissionController.php | 2 +- app/Http/Controllers/SearchController.php | 2 +- app/Http/Controllers/UserController.php | 7 +- app/Http/Middleware/TrustProxies.php | 2 +- app/Notifications/ConfirmEmail.php | 2 +- app/Notifications/ResetPassword.php | 2 +- app/Providers/AppServiceProvider.php | 2 +- app/Providers/BroadcastServiceProvider.php | 1 - app/Providers/CustomFacadeProvider.php | 12 +-- app/Providers/EventServiceProvider.php | 1 - app/Providers/LdapUserProvider.php | 2 - app/Providers/RouteServiceProvider.php | 1 - app/Settings/SettingService.php | 2 - app/Uploads/AttachmentService.php | 2 - app/Uploads/ImageRepo.php | 4 +- app/Uploads/ImageService.php | 8 +- 49 files changed, 144 insertions(+), 133 deletions(-) diff --git a/app/Actions/ActivityService.php b/app/Actions/ActivityService.php index 7b1046d22..37cd0a6a4 100644 --- a/app/Actions/ActivityService.php +++ b/app/Actions/ActivityService.php @@ -1,6 +1,5 @@ bookshelf = $bookshelf; + $this->book = $book; + $this->chapter = $chapter; + $this->page = $page; + $this->pageRevision = $pageRevision; + } + + /** + * Fetch all core entity types as an associated array + * with their basic names as the keys. + * @return Entity[] + */ + public function all() + { + return [ + 'bookshelf' => $this->bookshelf, + 'book' => $this->book, + 'chapter' => $this->chapter, + 'page' => $this->page, + ]; + } + + } \ No newline at end of file diff --git a/app/Entities/EntityRepo.php b/app/Entities/EntityRepo.php index 2031807ee..e2fe2307e 100644 --- a/app/Entities/EntityRepo.php +++ b/app/Entities/EntityRepo.php @@ -1,18 +1,11 @@