1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Re-structured the app code to be feature based rather than code type based

This commit is contained in:
Dan Brown
2018-09-25 12:30:50 +01:00
parent 19751ed1cb
commit 919660678b
109 changed files with 684 additions and 531 deletions

View File

@ -1,8 +1,8 @@
<?php namespace BookStack\Http\Controllers;
use BookStack\Repos\EntityRepo;
use BookStack\Services\SearchService;
use BookStack\Services\ViewService;
use BookStack\Entities\EntityRepo;
use BookStack\Entities\SearchService;
use BookStack\Actions\ViewService;
use Illuminate\Http\Request;
class SearchController extends Controller
@ -97,7 +97,7 @@ class SearchController extends Controller
$entities = $this->searchService->searchEntities($searchTerm, 'all', 1, 20, $permission)['results'];
} else {
$entityNames = $entityTypes->map(function ($type) {
return 'BookStack\\' . ucfirst($type);
return 'BookStack\\' . ucfirst($type); // TODO - Extract this elsewhere, too specific and stringy
})->toArray();
$entities = $this->viewService->getPopular(20, 0, $entityNames, $permission);
}