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