xref: /webtrees/app/Module/ModuleThemeInterface.php (revision 1afd8fb8ec6b95d0719e0a266a25e8ef0190c467)
1<?php
2/**
3 * webtrees: online genealogy
4 * Copyright (C) 2019 webtrees development team
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16declare(strict_types=1);
17
18namespace Fisharebest\Webtrees\Module;
19
20use Fisharebest\Webtrees\Fact;
21use Fisharebest\Webtrees\Individual;
22use Fisharebest\Webtrees\Menu;
23use Fisharebest\Webtrees\Tree;
24
25/**
26 * Interface ModuleThemelInterface - Classes and libraries for module system
27 */
28interface ModuleThemeInterface extends ModuleInterface
29{
30    /**
31     * Display an icon for this fact.
32     *
33     * @param Fact $fact
34     *
35     * @return string
36     */
37    public function icon(Fact $fact): string;
38
39    /**
40     * Display an individual in a box - for charts, etc.
41     *
42     * @param Individual $individual
43     *
44     * @return string
45     */
46    public function individualBox(Individual $individual): string;
47
48    /**
49     * Display an empty box - for a missing individual in a chart.
50     *
51     * @return string
52     */
53    public function individualBoxEmpty(): string;
54
55    /**
56     * Display an individual in a box - for charts, etc.
57     *
58     * @param Individual $individual
59     *
60     * @return string
61     */
62    public function individualBoxLarge(Individual $individual): string;
63
64    /**
65     * Display an individual in a box - for charts, etc.
66     *
67     * @param Individual $individual
68     *
69     * @return string
70     */
71    public function individualBoxSmall(Individual $individual): string;
72
73    /**
74     * Display an individual in a box - for charts, etc.
75     *
76     * @return string
77     */
78    public function individualBoxSmallEmpty(): string;
79
80    /**
81     * Links, to show in chart boxes;
82     *
83     * @param Individual $individual
84     *
85     * @return Menu[]
86     */
87    public function individualBoxMenu(Individual $individual): array;
88
89    /**
90     * Themes menu.
91     *
92     * @return Menu|null
93     */
94    public function menuThemes(): ?Menu;
95
96    /**
97     * Misecellaneous dimensions, fonts, styles, etc.
98     *
99     * @param string $parameter_name
100     *
101     * @return string|int|float
102     */
103    public function parameter($parameter_name);
104
105    /**
106     * Generate a list of items for the main menu.
107     *
108     * @param Tree|null $tree
109     *
110     * @return Menu[]
111     */
112    public function genealogyMenu(?Tree $tree): array;
113
114    /**
115     * Generate a list of items for the user menu.
116     *
117     * @param Tree|null $tree
118     *
119     * @return Menu[]
120     */
121    public function userMenu(?Tree $tree): array;
122
123    /**
124     * A list of CSS files to include for this page.
125     *
126     * @return string[]
127     */
128    public function stylesheets(): array;
129}
130