-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
FKCheckbox.php
45 lines (42 loc) · 908 Bytes
/
FKCheckbox.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* HTML Generator for checkbox for foreign keys
*
* @package PhpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Html\Forms\Fields;
use PhpMyAdmin\Template;
use PhpMyAdmin\Util;
use Throwable;
use Twig_Error_Loader;
use Twig_Error_Runtime;
use Twig_Error_Syntax;
/**
* HTML Generator for checkbox for foreign keys
*
* @package PhpMyAdmin
*/
class FKCheckbox implements FieldGenerator
{
/**
* Get HTML for Foreign key check checkbox
*
* @return string HTML for checkbox
*
* @throws Throwable
* @throws Twig_Error_Loader
* @throws Twig_Error_Runtime
* @throws Twig_Error_Syntax
*/
public static function generate(): string
{
$template = new Template();
return $template->render(
'fk_checkbox',
[
'checked' => Util::isForeignKeyCheck(),
]
);
}
}