From 8677a85bca0ddc098c15ad2efc0bfda2f9d4b508 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 25 Jun 2024 18:07:58 -0700 Subject: [PATCH] No longer need a twig extension Signed-off-by: Matt Friedman --- config/services.yml | 6 --- template/twig/extension/ba_is_numeric.php | 46 ----------------------- 2 files changed, 52 deletions(-) delete mode 100644 template/twig/extension/ba_is_numeric.php diff --git a/config/services.yml b/config/services.yml index 2e9857b..176fd24 100644 --- a/config/services.yml +++ b/config/services.yml @@ -57,9 +57,3 @@ services: - boardannouncements.table_lock.board_announcements_table - '@config' - '@dbal.conn' - - # ----- Twig extensions ----- - phpbb.boardannouncements.twig.extension.ba_is_numeric: - class: phpbb\boardannouncements\template\twig\extension\ba_is_numeric - tags: - - { name: twig.extension } diff --git a/template/twig/extension/ba_is_numeric.php b/template/twig/extension/ba_is_numeric.php deleted file mode 100644 index 90dd4c2..0000000 --- a/template/twig/extension/ba_is_numeric.php +++ /dev/null @@ -1,46 +0,0 @@ - - * @license GNU General Public License, version 2 (GPL-2.0) - * - */ - -namespace phpbb\boardannouncements\template\twig\extension; - -class ba_is_numeric extends \Twig\Extension\AbstractExtension -{ - /** - * Get the name of this extension - * - * @return string - */ - public function getName() - { - return 'ba_is_numeric'; - } - - /** - * Returns a list of global functions to add to the existing list. - * - * @return array An array of global functions - */ - public function getFunctions() - { - return [ - new \Twig\TwigFunction('ba_is_numeric', [$this, 'is_numeric']), - ]; - } - - /** - * Check if a value is numeric - * - * @return bool - */ - public function is_numeric($value) - { - return is_numeric($value); - } -}