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; 218eaf8709SGreg 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{ 28*defb8071SRichard Cissée public function tabTitle(): string; 29*defb8071SRichard Cissée 30a25f0a04SGreg Roach /** 3149a243cbSGreg Roach * Users change change the order of tabs using the control panel. 3249a243cbSGreg Roach * 3349a243cbSGreg Roach * @param int $tab_order 3449a243cbSGreg Roach * 3549a243cbSGreg Roach * @return void 3649a243cbSGreg Roach */ 3749a243cbSGreg Roach public function setTabOrder(int $tab_order): void; 3849a243cbSGreg Roach 3949a243cbSGreg Roach /** 4049a243cbSGreg Roach * Users change change the order of tabs using the control panel. 41a25f0a04SGreg Roach * 42cbc1590aSGreg Roach * @return int 43a25f0a04SGreg Roach */ 4449a243cbSGreg Roach public function getTabOrder(): int; 4549a243cbSGreg Roach 4649a243cbSGreg Roach /** 4749a243cbSGreg Roach * The default position for this tab. It can be changed in the control panel. 4849a243cbSGreg Roach * 4949a243cbSGreg Roach * @return int 5049a243cbSGreg Roach */ 51c1afbf58SGreg Roach public function defaultTabOrder(): int; 52a25f0a04SGreg Roach 53a25f0a04SGreg Roach /** 54a25f0a04SGreg Roach * Generate the HTML content of this tab. 55a25f0a04SGreg Roach * 56225e381fSGreg Roach * @param Individual $individual 57225e381fSGreg Roach * 58a25f0a04SGreg Roach * @return string 59a25f0a04SGreg Roach */ 608f53f488SRico Sonntag public function getTabContent(Individual $individual): string; 61a25f0a04SGreg Roach 62a25f0a04SGreg Roach /** 63a25f0a04SGreg Roach * Is this tab empty? If so, we don't always need to display it. 64cbc1590aSGreg Roach * 65225e381fSGreg Roach * @param Individual $individual 66225e381fSGreg Roach * 67cbc1590aSGreg Roach * @return bool 68a25f0a04SGreg Roach */ 698f53f488SRico Sonntag public function hasTabContent(Individual $individual): bool; 70a25f0a04SGreg Roach 71a25f0a04SGreg Roach /** 72a25f0a04SGreg Roach * Can this tab load asynchronously? 73a25f0a04SGreg Roach * 74cbc1590aSGreg Roach * @return bool 75a25f0a04SGreg Roach */ 768f53f488SRico Sonntag public function canLoadAjax(): bool; 77a25f0a04SGreg Roach 78a25f0a04SGreg Roach /** 79a25f0a04SGreg Roach * A greyed out tab has no actual content, but may perhaps have 80a25f0a04SGreg Roach * options to create content. 81a25f0a04SGreg Roach * 82225e381fSGreg Roach * @param Individual $individual 83225e381fSGreg Roach * 84cbc1590aSGreg Roach * @return bool 85a25f0a04SGreg Roach */ 868f53f488SRico Sonntag public function isGrayedOut(Individual $individual): bool; 878eaf8709SGreg Roach 888eaf8709SGreg Roach /** 898eaf8709SGreg Roach * This module handles the following facts - so don't show them on the "Facts and events" tab. 908eaf8709SGreg Roach * 918eaf8709SGreg Roach * @return Collection|string[] 928eaf8709SGreg Roach */ 938eaf8709SGreg Roach public function supportedFacts(): Collection; 94a25f0a04SGreg Roach} 95