3 declare(strict_types
=1);
5 namespace PhpMyAdmin\Twig
;
7 use PhpMyAdmin\Html\Generator
;
8 use PhpMyAdmin\Html\MySQLDocumentation
;
10 use PhpMyAdmin\Utils\Gis
;
11 use Twig\Extension\AbstractExtension
;
13 use Twig\TwigFunction
;
15 class UtilExtension
extends AbstractExtension
18 * Returns a list of functions to add to the existing list.
20 * @return TwigFunction[]
22 public function getFunctions(): array
30 'extract_column_spec',
31 Util
::extractColumnSpec(...),
35 Util
::formatByteDown(...),
39 Util
::formatNumber(...),
43 Generator
::formatSql(...),
44 ['is_safe' => ['html']],
48 MySQLDocumentation
::getDocumentationLink(...),
49 ['is_safe' => ['html']],
53 Generator
::getListNavigator(...),
54 ['is_safe' => ['html']],
58 MySQLDocumentation
::showDocumentation(...),
59 ['is_safe' => ['html']],
63 Gis
::getDataTypes(...),
67 Gis
::getFunctions(...),
71 Generator
::getIcon(...),
72 ['is_safe' => ['html']],
76 Generator
::getImage(...),
77 ['is_safe' => ['html']],
80 'get_supported_datatypes',
81 Generator
::getSupportedDatatypes(...),
82 ['is_safe' => ['html']],
86 Util
::isUUIDSupported(...),
90 Generator
::linkOrButton(...),
91 ['is_safe' => ['html']],
94 'link_to_var_documentation',
95 Generator
::linkToVarDocumentation(...),
96 ['is_safe' => ['html']],
100 Generator
::showHint(...),
101 ['is_safe' => ['html']],
105 Util
::showIcons(...),
113 MySQLDocumentation
::show(...),
114 ['is_safe' => ['html']],
117 'get_mysql_docu_url',
118 Util
::getMySQLDocuURL(...),
119 ['is_safe' => ['html']],
123 Util
::getDocuURL(...),
124 ['is_safe' => ['html']],
128 Generator
::showPHPDocumentation(...),
129 ['is_safe' => ['html']],
132 'sortable_table_header',
133 Util
::sortableTableHeader(...),
134 ['is_safe' => ['html']],
138 Util
::timespanFormat(...),
140 new TwigFunction('parse_enum_set_values', 'PhpMyAdmin\Util::parseEnumSetValues'),
145 * Returns a list of filters to add to the existing list.
147 * @return TwigFilter[]
149 public function getFilters(): array
153 'convert_bit_default_value',
154 Util
::convertBitDefaultValue(...),