xref: /webtrees/app/Http/RequestHandlers/ModulesSharesPage.php (revision 928cd455a0d0ab93c4c22e5bb5f8cb52c77e9bc9)
1853f2b8aSGreg Roach<?php
2853f2b8aSGreg Roach
3853f2b8aSGreg Roach/**
4853f2b8aSGreg Roach * webtrees: online genealogy
5853f2b8aSGreg Roach * Copyright (C) 2021 webtrees development team
6853f2b8aSGreg Roach * This program is free software: you can redistribute it and/or modify
7853f2b8aSGreg Roach * it under the terms of the GNU General Public License as published by
8853f2b8aSGreg Roach * the Free Software Foundation, either version 3 of the License, or
9853f2b8aSGreg Roach * (at your option) any later version.
10853f2b8aSGreg Roach * This program is distributed in the hope that it will be useful,
11853f2b8aSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12853f2b8aSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13853f2b8aSGreg Roach * GNU General Public License for more details.
14853f2b8aSGreg Roach * You should have received a copy of the GNU General Public License
15853f2b8aSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
16853f2b8aSGreg Roach */
17853f2b8aSGreg Roach
18853f2b8aSGreg Roachdeclare(strict_types=1);
19853f2b8aSGreg Roach
20853f2b8aSGreg Roachnamespace Fisharebest\Webtrees\Http\RequestHandlers;
21853f2b8aSGreg Roach
22853f2b8aSGreg Roachuse Fisharebest\Webtrees\I18N;
23853f2b8aSGreg Roachuse Fisharebest\Webtrees\Module\ModuleSidebarInterface;
24853f2b8aSGreg Roachuse Psr\Http\Message\ResponseInterface;
25853f2b8aSGreg Roachuse Psr\Http\Message\ServerRequestInterface;
26853f2b8aSGreg Roach
27853f2b8aSGreg Roachuse function view;
28853f2b8aSGreg Roach
29853f2b8aSGreg Roach/**
30853f2b8aSGreg Roach * Show a list of modules.
31853f2b8aSGreg Roach */
32*928cd455SGreg Roachclass ModulesSharesPage extends AbstractModuleComponentPage
33853f2b8aSGreg Roach{
34853f2b8aSGreg Roach    /**
35853f2b8aSGreg Roach     * @param ServerRequestInterface $request
36853f2b8aSGreg Roach     *
37853f2b8aSGreg Roach     * @return ResponseInterface
38853f2b8aSGreg Roach     */
39853f2b8aSGreg Roach    public function handle(ServerRequestInterface $request): ResponseInterface
40853f2b8aSGreg Roach    {
41853f2b8aSGreg Roach        return $this->listComponents(
42853f2b8aSGreg Roach            ModuleSidebarInterface::class,
43853f2b8aSGreg Roach            view('icons/sidebar') . I18N::translate('Sidebars'),
44853f2b8aSGreg Roach            ''
45853f2b8aSGreg Roach        );
46853f2b8aSGreg Roach    }
47853f2b8aSGreg Roach}
48