xref: /webtrees/app/Http/RequestHandlers/ModulesTabsPage.php (revision 9f667ff2169dfca16c3d1c0ebb87d36da533186b)
1*9f667ff2SGreg Roach<?php
2*9f667ff2SGreg Roach
3*9f667ff2SGreg Roach/**
4*9f667ff2SGreg Roach * webtrees: online genealogy
5*9f667ff2SGreg Roach * Copyright (C) 2020 webtrees development team
6*9f667ff2SGreg Roach * This program is free software: you can redistribute it and/or modify
7*9f667ff2SGreg Roach * it under the terms of the GNU General Public License as published by
8*9f667ff2SGreg Roach * the Free Software Foundation, either version 3 of the License, or
9*9f667ff2SGreg Roach * (at your option) any later version.
10*9f667ff2SGreg Roach * This program is distributed in the hope that it will be useful,
11*9f667ff2SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12*9f667ff2SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13*9f667ff2SGreg Roach * GNU General Public License for more details.
14*9f667ff2SGreg Roach * You should have received a copy of the GNU General Public License
15*9f667ff2SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
16*9f667ff2SGreg Roach */
17*9f667ff2SGreg Roach
18*9f667ff2SGreg Roachdeclare(strict_types=1);
19*9f667ff2SGreg Roach
20*9f667ff2SGreg Roachnamespace Fisharebest\Webtrees\Http\RequestHandlers;
21*9f667ff2SGreg Roach
22*9f667ff2SGreg Roachuse Fisharebest\Webtrees\I18N;
23*9f667ff2SGreg Roachuse Fisharebest\Webtrees\Module\ModuleTabInterface;
24*9f667ff2SGreg Roachuse Psr\Http\Message\ResponseInterface;
25*9f667ff2SGreg Roachuse Psr\Http\Message\ServerRequestInterface;
26*9f667ff2SGreg Roach
27*9f667ff2SGreg Roachuse function view;
28*9f667ff2SGreg Roach
29*9f667ff2SGreg Roach/**
30*9f667ff2SGreg Roach * Show a list of modules.
31*9f667ff2SGreg Roach */
32*9f667ff2SGreg Roachclass ModulesTabsPage extends AbstractModuleComponentPage
33*9f667ff2SGreg Roach{
34*9f667ff2SGreg Roach    /**
35*9f667ff2SGreg Roach     * @param ServerRequestInterface $request
36*9f667ff2SGreg Roach     *
37*9f667ff2SGreg Roach     * @return ResponseInterface
38*9f667ff2SGreg Roach     */
39*9f667ff2SGreg Roach    public function handle(ServerRequestInterface $request): ResponseInterface
40*9f667ff2SGreg Roach    {
41*9f667ff2SGreg Roach        return $this->listComponents(
42*9f667ff2SGreg Roach            ModuleTabInterface::class,
43*9f667ff2SGreg Roach            view('icons/tab') . I18N::translate('Tabs'),
44*9f667ff2SGreg Roach            ''
45*9f667ff2SGreg Roach        );
46*9f667ff2SGreg Roach    }
47*9f667ff2SGreg Roach}
48