1a25f0a04SGreg Roach<?php 23976b470SGreg 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 */ 17fcfa147eSGreg Roach 18e7f56f2aSGreg Roachdeclare(strict_types=1); 19e7f56f2aSGreg Roach 2076692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module; 21a25f0a04SGreg Roach 22225e381fSGreg Roachuse Fisharebest\Webtrees\Individual; 238eaf8709SGreg Roachuse Illuminate\Support\Collection; 24225e381fSGreg Roach 25a25f0a04SGreg Roach/** 26a25f0a04SGreg Roach * Interface ModuleSidebarInterface - Classes and libraries for module system 27a25f0a04SGreg Roach */ 2837eb8894SGreg Roachinterface ModuleSidebarInterface extends ModuleInterface 29c1010edaSGreg Roach{ 3039402588SGreg Roach /** 3139402588SGreg Roach * The text that appears on the sidebar's title. 3239402588SGreg Roach * 3339402588SGreg Roach * @return string 3439402588SGreg Roach */ 35defb8071SRichard Cissée public function sidebarTitle(): string; 36defb8071SRichard Cissée 37a25f0a04SGreg Roach /** 3849a243cbSGreg Roach * Users change change the order of sidebars using the control panel. 3949a243cbSGreg Roach * 4049a243cbSGreg Roach * @param int $sidebar_order 4149a243cbSGreg Roach * 4249a243cbSGreg Roach * @return void 4349a243cbSGreg Roach */ 4449a243cbSGreg Roach public function setSidebarOrder(int $sidebar_order): void; 4549a243cbSGreg Roach 4649a243cbSGreg Roach /** 4749a243cbSGreg Roach * Users change change the order of sidebars using the control panel. 48a25f0a04SGreg Roach * 49cbc1590aSGreg Roach * @return int 50a25f0a04SGreg Roach */ 5149a243cbSGreg Roach public function getSidebarOrder(): int; 5249a243cbSGreg Roach 5349a243cbSGreg Roach /** 5449a243cbSGreg Roach * The default position for this sidebar. It can be changed in the control panel. 5549a243cbSGreg Roach * 5649a243cbSGreg Roach * @return int 5749a243cbSGreg Roach */ 58c1afbf58SGreg Roach public function defaultSidebarOrder(): int; 59a25f0a04SGreg Roach 60a25f0a04SGreg Roach /** 61e490cd80SGreg Roach * Sidebar content. 62cbc1590aSGreg Roach * 63225e381fSGreg Roach * @param Individual $individual 64225e381fSGreg Roach * 65a25f0a04SGreg Roach * @return string 66a25f0a04SGreg Roach */ 678f53f488SRico Sonntag public function getSidebarContent(Individual $individual): string; 68a25f0a04SGreg Roach 69a25f0a04SGreg Roach /** 70a25f0a04SGreg Roach * Does this sidebar have anything to display for this individual? 71a25f0a04SGreg Roach * 72962e29c9SGreg Roach * @param Individual $individual 73225e381fSGreg Roach * 74cbc1590aSGreg Roach * @return bool 75a25f0a04SGreg Roach */ 768f53f488SRico Sonntag public function hasSidebarContent(Individual $individual): bool; 778eaf8709SGreg Roach /** 788eaf8709SGreg Roach * This module handles the following facts - so don't show them on the "Facts and events" tab. 798eaf8709SGreg Roach * 80*b5c8fd7eSGreg Roach * @return Collection<string> 818eaf8709SGreg Roach */ 828eaf8709SGreg Roach public function supportedFacts(): Collection; 83a25f0a04SGreg Roach} 84