xref: /webtrees/app/Module/ModuleChartInterface.php (revision 3976b4703df669696105ed6b024b96d433c8fbdb)
1a25f0a04SGreg Roach<?php
2*3976b470SGreg Roach
3a25f0a04SGreg Roach/**
4a25f0a04SGreg Roach * webtrees: online genealogy
58fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team
6a25f0a04SGreg Roach * This program is free software: you can redistribute it and/or modify
7a25f0a04SGreg Roach * it under the terms of the GNU General Public License as published by
8a25f0a04SGreg Roach * the Free Software Foundation, either version 3 of the License, or
9a25f0a04SGreg Roach * (at your option) any later version.
10a25f0a04SGreg Roach * This program is distributed in the hope that it will be useful,
11a25f0a04SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12a25f0a04SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13a25f0a04SGreg Roach * GNU General Public License for more details.
14a25f0a04SGreg Roach * You should have received a copy of the GNU General Public License
15a25f0a04SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
16a25f0a04SGreg Roach */
17e7f56f2aSGreg Roachdeclare(strict_types=1);
18e7f56f2aSGreg Roach
1976692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module;
20a25f0a04SGreg Roach
21168ff6f3Sric2016use Fisharebest\Webtrees\Individual;
224eb71cfaSGreg Roachuse Fisharebest\Webtrees\Menu;
23168ff6f3Sric2016
24a25f0a04SGreg Roach/**
25a25f0a04SGreg Roach * Interface ModuleChartInterface - Classes and libraries for module system
26a25f0a04SGreg Roach */
2737eb8894SGreg Roachinterface ModuleChartInterface extends ModuleInterface
28c1010edaSGreg Roach{
29168ff6f3Sric2016    /**
30377a2979SGreg Roach     * A menu item for this chart for an individual box in a chart.
31377a2979SGreg Roach     *
32377a2979SGreg Roach     * @param Individual $individual
33377a2979SGreg Roach     *
34377a2979SGreg Roach     * @return Menu|null
35377a2979SGreg Roach     */
36377a2979SGreg Roach    public function chartBoxMenu(Individual $individual): ?Menu;
37377a2979SGreg Roach
38377a2979SGreg Roach    /**
39e6562982SGreg Roach     * A main menu item for this chart.
40168ff6f3Sric2016     *
4160bc3e3fSGreg Roach     * @param Individual $individual
4260bc3e3fSGreg Roach     *
43e6562982SGreg Roach     * @return Menu
44168ff6f3Sric2016     */
45e6562982SGreg Roach    public function chartMenu(Individual $individual): Menu;
46168ff6f3Sric2016
47168ff6f3Sric2016    /**
48377a2979SGreg Roach     * CSS class for the menu.
49168ff6f3Sric2016     *
50377a2979SGreg Roach     * @return string
51168ff6f3Sric2016     */
52377a2979SGreg Roach    public function chartMenuClass(): string;
53e6562982SGreg Roach
54e6562982SGreg Roach    /**
55e6562982SGreg Roach     * The title for a specific instance of this chart.
56e6562982SGreg Roach     *
57e6562982SGreg Roach     * @param Individual $individual
58e6562982SGreg Roach     *
59e6562982SGreg Roach     * @return string
60e6562982SGreg Roach     */
61e6562982SGreg Roach    public function chartTitle(Individual $individual): string;
62e6562982SGreg Roach
63e6562982SGreg Roach    /**
64e539f5c6SGreg Roach     * The URL for a page showing chart options.
65e6562982SGreg Roach     *
66e6562982SGreg Roach     * @param Individual $individual
67e6562982SGreg Roach     * @param string[]   $parameters
68e6562982SGreg Roach     *
69e6562982SGreg Roach     * @return string
70e6562982SGreg Roach     */
71e6562982SGreg Roach    public function chartUrl(Individual $individual, array $parameters = []): string;
72e6562982SGreg Roach
73e6562982SGreg Roach    /**
74e6562982SGreg Roach     * Attributes for the URL.
75e6562982SGreg Roach     *
76e6562982SGreg Roach     * @return string[]
77e6562982SGreg Roach     */
78e6562982SGreg Roach    public function chartUrlAttributes(): array;
79a25f0a04SGreg Roach}
80