PluginsExtension.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * hold PhpMyAdmin\Twig\PluginsExtension class
  5. *
  6. * @package PhpMyAdmin\Twig
  7. */
  8. namespace PhpMyAdmin\Twig;
  9. use Twig\Extension\AbstractExtension;
  10. use Twig\TwigFunction;
  11. /**
  12. * Class PluginsExtension
  13. *
  14. * @package PhpMyAdmin\Twig
  15. */
  16. class PluginsExtension 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. 'Plugins_checkboxCheck',
  28. 'PhpMyAdmin\Plugins::checkboxCheck',
  29. array('is_safe' => array('html'))
  30. ),
  31. new TwigFunction(
  32. 'Plugins_getChoice',
  33. 'PhpMyAdmin\Plugins::getChoice',
  34. array('is_safe' => array('html'))
  35. ),
  36. new TwigFunction(
  37. 'Plugins_getDefault',
  38. 'PhpMyAdmin\Plugins::getDefault',
  39. array('is_safe' => array('html'))
  40. ),
  41. new TwigFunction(
  42. 'Plugins_getOptions',
  43. 'PhpMyAdmin\Plugins::getOptions',
  44. array('is_safe' => array('html'))
  45. ),
  46. );
  47. }
  48. }