1*027c6af4SGreg Roach<?php 2*027c6af4SGreg Roach/** 3*027c6af4SGreg Roach * webtrees: online genealogy 4*027c6af4SGreg Roach * Copyright (C) 2018 webtrees development team 5*027c6af4SGreg Roach * This program is free software: you can redistribute it and/or modify 6*027c6af4SGreg Roach * it under the terms of the GNU General Public License as published by 7*027c6af4SGreg Roach * the Free Software Foundation, either version 3 of the License, or 8*027c6af4SGreg Roach * (at your option) any later version. 9*027c6af4SGreg Roach * This program is distributed in the hope that it will be useful, 10*027c6af4SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*027c6af4SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*027c6af4SGreg Roach * GNU General Public License for more details. 13*027c6af4SGreg Roach * You should have received a copy of the GNU General Public License 14*027c6af4SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 15*027c6af4SGreg Roach */ 16*027c6af4SGreg Roachdeclare(strict_types=1); 17*027c6af4SGreg Roach 18*027c6af4SGreg Roachnamespace Fisharebest\Webtrees\Module; 19*027c6af4SGreg Roach 20*027c6af4SGreg Roachuse Fisharebest\Webtrees\Tree; 21*027c6af4SGreg Roachuse Symfony\Component\HttpFoundation\Request; 22*027c6af4SGreg Roach 23*027c6af4SGreg Roach/** 24*027c6af4SGreg Roach * Interface ModuleInterface - Classes and libraries for module system 25*027c6af4SGreg Roach */ 26*027c6af4SGreg Roachinterface ModuleInterface 27*027c6af4SGreg Roach{ 28*027c6af4SGreg Roach /** 29*027c6af4SGreg Roach * Create a new module. 30*027c6af4SGreg Roach * 31*027c6af4SGreg Roach * @param string $directory Where is this module installed 32*027c6af4SGreg Roach */ 33*027c6af4SGreg Roach public function __construct(string $directory); 34*027c6af4SGreg Roach 35*027c6af4SGreg Roach /** 36*027c6af4SGreg Roach * How should this module be labelled on tabs, menus, etc.? 37*027c6af4SGreg Roach * 38*027c6af4SGreg Roach * @return string 39*027c6af4SGreg Roach */ 40*027c6af4SGreg Roach public function getTitle(): string; 41*027c6af4SGreg Roach 42*027c6af4SGreg Roach /** 43*027c6af4SGreg Roach * A sentence describing what this module does. 44*027c6af4SGreg Roach * 45*027c6af4SGreg Roach * @return string 46*027c6af4SGreg Roach */ 47*027c6af4SGreg Roach public function getDescription(): string; 48*027c6af4SGreg Roach 49*027c6af4SGreg Roach /** 50*027c6af4SGreg Roach * What is the default access level for this module? 51*027c6af4SGreg Roach * 52*027c6af4SGreg Roach * Some modules are aimed at admins or managers, and are not generally shown to users. 53*027c6af4SGreg Roach * 54*027c6af4SGreg Roach * @return int Returns one of: Auth::PRIV_HIDE, Auth::PRIV_PRIVATE, Auth::PRIV_USER, Auth::PRIV_NONE 55*027c6af4SGreg Roach */ 56*027c6af4SGreg Roach public function defaultAccessLevel(): int; 57*027c6af4SGreg Roach 58*027c6af4SGreg Roach /** 59*027c6af4SGreg Roach * Provide a unique internal name for this module 60*027c6af4SGreg Roach * 61*027c6af4SGreg Roach * @return string 62*027c6af4SGreg Roach */ 63*027c6af4SGreg Roach public function getName(): string; 64*027c6af4SGreg Roach} 65