1*9f667ff2SGreg Roach<?php 2*9f667ff2SGreg Roach 3*9f667ff2SGreg Roach/** 4*9f667ff2SGreg Roach * webtrees: online genealogy 5*9f667ff2SGreg Roach * Copyright (C) 20 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\FlashMessages; 23*9f667ff2SGreg Roachuse Fisharebest\Webtrees\I18N; 24*9f667ff2SGreg Roachuse Fisharebest\Webtrees\Module\ModuleChartInterface; 25*9f667ff2SGreg Roachuse Psr\Http\Message\ResponseInterface; 26*9f667ff2SGreg Roachuse Psr\Http\Message\ServerRequestInterface; 27*9f667ff2SGreg Roach 28*9f667ff2SGreg Roachuse function redirect; 29*9f667ff2SGreg Roachuse function route; 30*9f667ff2SGreg Roach 31*9f667ff2SGreg Roach/** 32*9f667ff2SGreg Roach * Update a list of modules. 33*9f667ff2SGreg Roach */ 34*9f667ff2SGreg Roachclass ModulesChartsAction extends AbstractModuleComponentAction 35*9f667ff2SGreg Roach{ 36*9f667ff2SGreg Roach /** 37*9f667ff2SGreg Roach * @param ServerRequestInterface $request 38*9f667ff2SGreg Roach * 39*9f667ff2SGreg Roach * @return ResponseInterface 40*9f667ff2SGreg Roach */ 41*9f667ff2SGreg Roach public function handle(ServerRequestInterface $request): ResponseInterface 42*9f667ff2SGreg Roach { 43*9f667ff2SGreg Roach $this->updateStatus(ModuleChartInterface::class, $request); 44*9f667ff2SGreg Roach $this->updateAccessLevel(ModuleChartInterface::class, $request); 45*9f667ff2SGreg Roach 46*9f667ff2SGreg Roach FlashMessages::addMessage(I18N::translate('The website preferences have been updated.'), 'success'); 47*9f667ff2SGreg Roach 48*9f667ff2SGreg Roach return redirect(route(ControlPanel::class)); 49*9f667ff2SGreg Roach } 50*9f667ff2SGreg Roach} 51