TableExtension.php 668 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * hold PhpMyAdmin\Twig\TableExtension class
  5. *
  6. * @package PhpMyAdmin\Twig
  7. */
  8. declare(strict_types=1);
  9. namespace PhpMyAdmin\Twig;
  10. use Twig\Extension\AbstractExtension;
  11. use Twig\TwigFunction;
  12. /**
  13. * Class TableExtension
  14. *
  15. * @package PhpMyAdmin\Twig
  16. */
  17. class TableExtension extends AbstractExtension
  18. {
  19. /**
  20. * Returns a list of functions to add to the existing list.
  21. *
  22. * @return TwigFunction[]
  23. */
  24. public function getFunctions()
  25. {
  26. return [
  27. new TwigFunction(
  28. 'table_get',
  29. 'PhpMyAdmin\Table::get'
  30. ),
  31. ];
  32. }
  33. }