1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* webtrees: online genealogy |
5
|
|
|
* Copyright (C) 2023 webtrees development team |
6
|
|
|
* This program is free software: you can redistribute it and/or modify |
7
|
|
|
* it under the terms of the GNU General Public License as published by |
8
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
9
|
|
|
* (at your option) any later version. |
10
|
|
|
* This program is distributed in the hope that it will be useful, |
11
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13
|
|
|
* GNU General Public License for more details. |
14
|
|
|
* You should have received a copy of the GNU General Public License |
15
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
16
|
|
|
*/ |
17
|
|
|
|
18
|
|
|
declare(strict_types=1); |
19
|
|
|
|
20
|
|
|
namespace Fisharebest\Webtrees\Module; |
21
|
|
|
|
22
|
|
|
use Fig\Http\Message\StatusCodeInterface; |
23
|
|
|
use Fisharebest\Webtrees\Auth; |
24
|
|
|
use Fisharebest\Webtrees\I18N; |
25
|
|
|
use Fisharebest\Webtrees\Registry; |
26
|
|
|
use Fisharebest\Webtrees\Validator; |
27
|
|
|
use Psr\Http\Message\ResponseInterface; |
28
|
|
|
use Psr\Http\Message\ServerRequestInterface; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* Class FamilyListModule |
32
|
|
|
*/ |
33
|
|
|
class FamilyListModule extends IndividualListModule |
34
|
|
|
{ |
35
|
|
|
protected const ROUTE_URL = '/tree/{tree}/family-list'; |
36
|
|
|
|
37
|
|
|
// The individual list and family list use the same code/logic. |
38
|
|
|
// They just display different lists. |
39
|
|
|
protected bool $families = true; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* How should this module be identified in the control panel, etc.? |
43
|
|
|
* |
44
|
|
|
* @return string |
45
|
|
|
*/ |
46
|
|
|
public function title(): string |
47
|
|
|
{ |
48
|
|
|
/* I18N: Name of a module/list */ |
49
|
|
|
return I18N::translate('Families'); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* A sentence describing what this module does. |
54
|
|
|
* |
55
|
|
|
* @return string |
56
|
|
|
*/ |
57
|
|
|
public function description(): string |
58
|
|
|
{ |
59
|
|
|
/* I18N: Description of the “Families” module */ |
60
|
|
|
return I18N::translate('A list of families.'); |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* CSS class for the URL. |
65
|
|
|
* |
66
|
|
|
* @return string |
67
|
|
|
*/ |
68
|
|
|
public function listMenuClass(): string |
69
|
|
|
{ |
70
|
|
|
return 'menu-list-fam'; |
71
|
|
|
} |
72
|
|
|
} |
73
|
|
|
|