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