. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fisharebest\Webtrees\Http\ViewResponseTrait; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Services\ModuleService; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; /** * Show a list of modules. */ class ModulesAllPage implements RequestHandlerInterface { use ViewResponseTrait; private ModuleService $module_service; /** * @param ModuleService $module_service */ public function __construct(ModuleService $module_service) { $this->module_service = $module_service; } /** * Delete the database settings for a deleted module. * * @param ServerRequestInterface $request * * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { $this->layout = 'layouts/administration'; return $this->viewResponse('admin/modules', [ 'title' => I18N::translate('All modules'), 'modules' => $this->module_service->all(true), 'deleted_modules' => $this->module_service->deletedModules(), ]); } }