From d083ee09bc472b30a69198fb61f46220007112ba Mon Sep 17 00:00:00 2001 From: wrenge Date: Wed, 27 Nov 2024 10:31:30 +0300 Subject: [PATCH] cs_simple_type filter --- src/codegen.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/codegen.inc.php b/src/codegen.inc.php index 43efa59..31ade4d 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -128,6 +128,15 @@ function _add_twig_support(\Twig\Environment $twig) return cs_type($type); } )); + $twig->addFilter(new \Twig\TwigFilter('cs_simple_type', + function($type) + { + if($type instanceof \mtgArrType) + return cs_simple_type($type->getValue()); + else + return cs_simple_type($type); + } + )); $twig->addFilter(new \Twig\TwigFilter('cs_type_prefix', function($type) {