xref: /webtrees/app/Module/ModuleThemeInterface.php (revision 11eb858145c6c7c490e5c0cd7b0bd51e519264f0)
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;
23
24/**
25 * Interface ModuleThemelInterface - Classes and libraries for module system
26 */
27interface ModuleThemeInterface extends ModuleInterface
28{
29    /**
30     * Display an icon for this fact.
31     *
32     * @param Fact $fact
33     *
34     * @return string
35     */
36    public function icon(Fact $fact): string;
37
38    /**
39     * Display an individual in a box - for charts, etc.
40     *
41     * @param Individual $individual
42     *
43     * @return string
44     */
45    public function individualBox(Individual $individual): string;
46
47    /**
48     * Display an empty box - for a missing individual in a chart.
49     *
50     * @return string
51     */
52    public function individualBoxEmpty(): string;
53
54    /**
55     * Display an individual in a box - for charts, etc.
56     *
57     * @param Individual $individual
58     *
59     * @return string
60     */
61    public function individualBoxLarge(Individual $individual): string;
62
63    /**
64     * Display an individual in a box - for charts, etc.
65     *
66     * @param Individual $individual
67     *
68     * @return string
69     */
70    public function individualBoxSmall(Individual $individual): string;
71
72    /**
73     * Display an individual in a box - for charts, etc.
74     *
75     * @return string
76     */
77    public function individualBoxSmallEmpty(): string;
78
79    /**
80     * Links, to show in chart boxes;
81     *
82     * @param Individual $individual
83     *
84     * @return Menu[]
85     */
86    public function individualBoxMenu(Individual $individual): array;
87
88    /**
89     * Themes menu.
90     *
91     * @return Menu|null
92     */
93    public function menuThemes();
94
95    /**
96     * Misecellaneous dimensions, fonts, styles, etc.
97     *
98     * @param string $parameter_name
99     *
100     * @return string|int|float
101     */
102    public function parameter($parameter_name);
103
104    /**
105     * Generate a list of items for the main menu.
106     *
107     * @return Menu[]
108     */
109    public function primaryMenu(): array;
110
111    /**
112     * Generate a list of items for the user menu.
113     *
114     * @return Menu[]
115     */
116    public function secondaryMenu(): array;
117
118    /**
119     * A list of CSS files to include for this page.
120     *
121     * @return string[]
122     */
123    public function stylesheets(): array;
124}
125