CharsetsExtension.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * hold PhpMyAdmin\Twig\CharsetsExtension class
  5. *
  6. * @package PhpMyAdmin\Twig
  7. */
  8. namespace PhpMyAdmin\Twig;
  9. use Twig\Extension\AbstractExtension;
  10. use Twig\TwigFunction;
  11. /**
  12. * Class CharsetsExtension
  13. *
  14. * @package PhpMyAdmin\Twig
  15. */
  16. class CharsetsExtension extends AbstractExtension
  17. {
  18. /**
  19. * Returns a list of functions to add to the existing list.
  20. *
  21. * @return TwigFunction[]
  22. */
  23. public function getFunctions()
  24. {
  25. return array(
  26. new TwigFunction(
  27. 'Charsets_getCollationDescr',
  28. 'PhpMyAdmin\Charsets::getCollationDescr'
  29. ),
  30. new TwigFunction(
  31. 'Charsets_getCharsetDropdownBox',
  32. 'PhpMyAdmin\Charsets::getCharsetDropdownBox',
  33. array('is_safe' => array('html'))
  34. ),
  35. new TwigFunction(
  36. 'Charsets_getCollationDropdownBox',
  37. 'PhpMyAdmin\Charsets::getCollationDropdownBox',
  38. array('is_safe' => array('html'))
  39. ),
  40. );
  41. }
  42. }