167992b6aSRichard Cissee<?php 23976b470SGreg Roach 367992b6aSRichard Cissee/** 467992b6aSRichard Cissee * webtrees: online genealogy 567992b6aSRichard Cissee * Copyright (C) 2019 webtrees development team 667992b6aSRichard Cissee * This program is free software: you can redistribute it and/or modify 767992b6aSRichard Cissee * it under the terms of the GNU General Public License as published by 867992b6aSRichard Cissee * the Free Software Foundation, either version 3 of the License, or 967992b6aSRichard Cissee * (at your option) any later version. 1067992b6aSRichard Cissee * This program is distributed in the hope that it will be useful, 1167992b6aSRichard Cissee * but WITHOUT ANY WARRANTY; without even the implied warranty of 1267992b6aSRichard Cissee * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1367992b6aSRichard Cissee * GNU General Public License for more details. 1467992b6aSRichard Cissee * You should have received a copy of the GNU General Public License 1567992b6aSRichard Cissee * along with this program. If not, see <http://www.gnu.org/licenses/>. 1667992b6aSRichard Cissee */ 17*fcfa147eSGreg Roach 1867992b6aSRichard Cisseedeclare(strict_types=1); 1967992b6aSRichard Cissee 2067992b6aSRichard Cisseenamespace Fisharebest\Webtrees\Module; 2167992b6aSRichard Cissee 2267992b6aSRichard Cisseeuse Fisharebest\Webtrees\Menu; 2367992b6aSRichard Cisseeuse Fisharebest\Webtrees\Tree; 2467992b6aSRichard Cissee 2567992b6aSRichard Cissee/** 2667992b6aSRichard Cissee * Interface ModuleListInterface - Classes and libraries for module system 2767992b6aSRichard Cissee */ 2867992b6aSRichard Cisseeinterface ModuleListInterface extends ModuleInterface 2967992b6aSRichard Cissee{ 3067992b6aSRichard Cissee 3167992b6aSRichard Cissee /** 3267992b6aSRichard Cissee * A main menu item for this list, or null if the list is empty. 3367992b6aSRichard Cissee * 3467992b6aSRichard Cissee * @param Tree $tree 3567992b6aSRichard Cissee * 3667992b6aSRichard Cissee * @return Menu|null 3767992b6aSRichard Cissee */ 3867992b6aSRichard Cissee public function listMenu(Tree $tree): ?Menu; 3967992b6aSRichard Cissee 4067992b6aSRichard Cissee /** 4167992b6aSRichard Cissee * CSS class for the menu. 4267992b6aSRichard Cissee * 4367992b6aSRichard Cissee * @return string 4467992b6aSRichard Cissee */ 4567992b6aSRichard Cissee public function listMenuClass(): string; 4667992b6aSRichard Cissee 4767992b6aSRichard Cissee /** 4867992b6aSRichard Cissee * The title for a specific instance of this list. 4967992b6aSRichard Cissee * 5067992b6aSRichard Cissee * @return string 5167992b6aSRichard Cissee */ 5267992b6aSRichard Cissee public function listTitle(): string; 5367992b6aSRichard Cissee 5467992b6aSRichard Cissee /** 5567992b6aSRichard Cissee * The URL for a page showing list options. 5667992b6aSRichard Cissee * 5767992b6aSRichard Cissee * @param Tree $tree 5867992b6aSRichard Cissee * @param string[] $parameters 5967992b6aSRichard Cissee * 6067992b6aSRichard Cissee * @return string 6167992b6aSRichard Cissee */ 6267992b6aSRichard Cissee public function listUrl(Tree $tree, array $parameters = []): string; 6367992b6aSRichard Cissee 6467992b6aSRichard Cissee /** 6567992b6aSRichard Cissee * Attributes for the URL. 6667992b6aSRichard Cissee * 6767992b6aSRichard Cissee * @return string[] 6867992b6aSRichard Cissee */ 6967992b6aSRichard Cissee public function listUrlAttributes(): array; 7067992b6aSRichard Cissee 714db4b4a9SGreg Roach /** 724db4b4a9SGreg Roach * @param Tree $tree 734db4b4a9SGreg Roach * 744db4b4a9SGreg Roach * @return bool 754db4b4a9SGreg Roach */ 7667992b6aSRichard Cissee public function listIsEmpty(Tree $tree): bool; 7767992b6aSRichard Cissee} 78