1a25f0a04SGreg Roach<?php 2a25f0a04SGreg Roach/** 3a25f0a04SGreg Roach * webtrees: online genealogy 48fcd0d32SGreg Roach * Copyright (C) 2019 webtrees development team 5a25f0a04SGreg Roach * This program is free software: you can redistribute it and/or modify 6a25f0a04SGreg Roach * it under the terms of the GNU General Public License as published by 7a25f0a04SGreg Roach * the Free Software Foundation, either version 3 of the License, or 8a25f0a04SGreg Roach * (at your option) any later version. 9a25f0a04SGreg Roach * This program is distributed in the hope that it will be useful, 10a25f0a04SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 11a25f0a04SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12a25f0a04SGreg Roach * GNU General Public License for more details. 13a25f0a04SGreg Roach * You should have received a copy of the GNU General Public License 14a25f0a04SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 15a25f0a04SGreg Roach */ 16e7f56f2aSGreg Roachdeclare(strict_types=1); 17e7f56f2aSGreg Roach 1876692c8bSGreg Roachnamespace Fisharebest\Webtrees\Module; 19c1010edaSGreg Roach 20225e381fSGreg Roachuse Fisharebest\Webtrees\Individual; 21*8eaf8709SGreg Roachuse Illuminate\Support\Collection; 22a25f0a04SGreg Roach 23a25f0a04SGreg Roach/** 24a25f0a04SGreg Roach * Interface ModuleTabInterface - Classes and libraries for module system 25a25f0a04SGreg Roach */ 2637eb8894SGreg Roachinterface ModuleTabInterface extends ModuleInterface 27c1010edaSGreg Roach{ 28a25f0a04SGreg Roach /** 2949a243cbSGreg Roach * Users change change the order of tabs using the control panel. 3049a243cbSGreg Roach * 3149a243cbSGreg Roach * @param int $tab_order 3249a243cbSGreg Roach * 3349a243cbSGreg Roach * @return void 3449a243cbSGreg Roach */ 3549a243cbSGreg Roach public function setTabOrder(int $tab_order): void; 3649a243cbSGreg Roach 3749a243cbSGreg Roach /** 3849a243cbSGreg Roach * Users change change the order of tabs using the control panel. 39a25f0a04SGreg Roach * 40cbc1590aSGreg Roach * @return int 41a25f0a04SGreg Roach */ 4249a243cbSGreg Roach public function getTabOrder(): int; 4349a243cbSGreg Roach 4449a243cbSGreg Roach /** 4549a243cbSGreg Roach * The default position for this tab. It can be changed in the control panel. 4649a243cbSGreg Roach * 4749a243cbSGreg Roach * @return int 4849a243cbSGreg Roach */ 49c1afbf58SGreg Roach public function defaultTabOrder(): int; 50a25f0a04SGreg Roach 51a25f0a04SGreg Roach /** 52a25f0a04SGreg Roach * Generate the HTML content of this tab. 53a25f0a04SGreg Roach * 54225e381fSGreg Roach * @param Individual $individual 55225e381fSGreg Roach * 56a25f0a04SGreg Roach * @return string 57a25f0a04SGreg Roach */ 588f53f488SRico Sonntag public function getTabContent(Individual $individual): string; 59a25f0a04SGreg Roach 60a25f0a04SGreg Roach /** 61a25f0a04SGreg Roach * Is this tab empty? If so, we don't always need to display it. 62cbc1590aSGreg Roach * 63225e381fSGreg Roach * @param Individual $individual 64225e381fSGreg Roach * 65cbc1590aSGreg Roach * @return bool 66a25f0a04SGreg Roach */ 678f53f488SRico Sonntag public function hasTabContent(Individual $individual): bool; 68a25f0a04SGreg Roach 69a25f0a04SGreg Roach /** 70a25f0a04SGreg Roach * Can this tab load asynchronously? 71a25f0a04SGreg Roach * 72cbc1590aSGreg Roach * @return bool 73a25f0a04SGreg Roach */ 748f53f488SRico Sonntag public function canLoadAjax(): bool; 75a25f0a04SGreg Roach 76a25f0a04SGreg Roach /** 77a25f0a04SGreg Roach * A greyed out tab has no actual content, but may perhaps have 78a25f0a04SGreg Roach * options to create content. 79a25f0a04SGreg Roach * 80225e381fSGreg Roach * @param Individual $individual 81225e381fSGreg Roach * 82cbc1590aSGreg Roach * @return bool 83a25f0a04SGreg Roach */ 848f53f488SRico Sonntag public function isGrayedOut(Individual $individual): bool; 85*8eaf8709SGreg Roach 86*8eaf8709SGreg Roach /** 87*8eaf8709SGreg Roach * This module handles the following facts - so don't show them on the "Facts and events" tab. 88*8eaf8709SGreg Roach * 89*8eaf8709SGreg Roach * @return Collection|string[] 90*8eaf8709SGreg Roach */ 91*8eaf8709SGreg Roach public function supportedFacts(): Collection; 92a25f0a04SGreg Roach} 93