1<?php 2/* 3 * vim:set softtabstop=4 shiftwidth=4 expandtab: 4 * 5 * LICENSE: GNU Affero General Public License, version 3 (AGPL-3.0-or-later) 6 * Copyright 2001 - 2020 Ampache.org 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU Affero General Public License as published by 10 * the Free Software Foundation, either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU Affero General Public License for more details. 17 * 18 * You should have received a copy of the GNU Affero General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 * 21 */ 22 23namespace Ampache\Module\Util; 24 25interface UiInterface 26{ 27 /** 28 * Show the requested template file 29 */ 30 public function show(string $template, array $context = []): void; 31 32 /** 33 * This displays the query stats 34 */ 35 public function showQueryStats(): void; 36 37 /** 38 * This displays the footer 39 */ 40 public function showFooter(): void; 41 42 /** 43 * This displays the header 44 */ 45 public function showHeader(): void; 46 47 public function showBoxTop(string $title = '', string $class = ''): void; 48 49 public function showBoxBottom(): void; 50 51 /** 52 * Displays the default error page 53 */ 54 public function accessDenied(string $error = 'Access Denied'): void; 55 56 /** 57 * shows a confirmation of an action 58 * 59 * @param string $title The Title of the message 60 * @param string $text The details of the message 61 * @param string $next_url Where to go next 62 * @param integer $cancel T/F show a cancel button that uses return_referer() 63 * @param string $form_name 64 * @param boolean $visible 65 */ 66 public function showConfirmation( 67 $title, 68 $text, 69 $next_url, 70 $cancel = 0, 71 $form_name = 'confirmation', 72 $visible = true 73 ): void; 74 75 public function scrubOut(?string $string): string; 76 77 /** 78 * takes the key and then creates the correct type of input for updating it 79 */ 80 public function createPreferenceInput( 81 string $name, 82 $value 83 ); 84 85 /** 86 * This shows the preference box for the preferences pages. 87 * 88 * @var array<string, mixed> $preferences 89 */ 90 public function showPreferenceBox(array $preferences): void; 91} 92