1<?php 2/** 3 * webtrees: online genealogy 4 * Copyright (C) 2016 webtrees development team 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16namespace Fisharebest\Webtrees\Module; 17 18/** 19 * Interface ModuleBlockInterface - Classes and libraries for module system 20 */ 21interface ModuleBlockInterface { 22 /** 23 * Generate the HTML content of this block. 24 * 25 * @param int $block_id 26 * @param bool $template 27 * @param string[] $cfg 28 * 29 * @return string 30 */ 31 public function getBlock($block_id, $template = true, $cfg = array()); 32 33 /** 34 * Should this block load asynchronously using AJAX? 35 * 36 * Simple blocks are faster in-line, more comples ones 37 * can be loaded later. 38 * 39 * @return bool 40 */ 41 public function loadAjax(); 42 43 /** 44 * Can this block be shown on the user’s home page? 45 * 46 * @return bool 47 */ 48 public function isUserBlock(); 49 50 /** 51 * Can this block be shown on the tree’s home page? 52 * 53 * @return bool 54 */ 55 public function isGedcomBlock(); 56 57 /** 58 * An HTML form to edit block settings 59 * 60 * @param int $block_id 61 */ 62 public function configureBlock($block_id); 63} 64