1 | <?php |
||
2 | |||
3 | /** |
||
4 | * ModalInterface.php - Interface for modal dialogs. |
||
5 | * |
||
6 | * @package jaxon-core |
||
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
7 | * @author Thierry Feuzeu <[email protected]> |
||
8 | * @copyright 2022 Thierry Feuzeu <[email protected]> |
||
9 | * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License |
||
10 | * @link https://github.com/jaxon-php/jaxon-core |
||
11 | */ |
||
0 ignored issues
–
show
|
|||
12 | |||
13 | namespace Jaxon\App\Dialog; |
||
14 | |||
15 | interface ModalInterface extends LibraryInterface |
||
0 ignored issues
–
show
|
|||
16 | { |
||
17 | /** |
||
18 | * Show a modal dialog. |
||
19 | * |
||
20 | * @param string $sTitle The title of the dialog |
||
0 ignored issues
–
show
|
|||
21 | * @param string $sContent The content of the dialog |
||
22 | * @param array $aButtons The buttons of the dialog |
||
0 ignored issues
–
show
|
|||
23 | * @param array $aOptions The options of the dialog |
||
0 ignored issues
–
show
|
|||
24 | * |
||
25 | * Each button is an array with the following entries: |
||
0 ignored issues
–
show
|
|||
26 | * - title: the text to be printed in the button |
||
0 ignored issues
–
show
|
|||
27 | * - class: the CSS class of the button |
||
0 ignored issues
–
show
|
|||
28 | * - click: the javascript function to be called when the button is clicked |
||
0 ignored issues
–
show
|
|||
29 | * If the click value is set to "close", then the button closes the dialog. |
||
0 ignored issues
–
show
|
|||
30 | * |
||
31 | * The content of the $aOptions depends on the javascript library in use. |
||
0 ignored issues
–
show
|
|||
32 | * Check their specific documentation for more information. |
||
0 ignored issues
–
show
|
|||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | public function show(string $sTitle, string $sContent, array $aButtons, array $aOptions = []); |
||
0 ignored issues
–
show
|
|||
37 | |||
38 | /** |
||
39 | * Hide the modal dialog. |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function hide(); |
||
0 ignored issues
–
show
|
|||
44 | } |
||
45 |