diff --git a/src/Tpl.php b/src/Tpl.php index 009c083..9a90fba 100644 --- a/src/Tpl.php +++ b/src/Tpl.php @@ -233,6 +233,16 @@ class Tpl { self :: $smarty -> registerPlugin("function", $name, $callable); } + /** + * Register a modifier usable from template files + * @param string $name The modifier name + * @param callable $callable The modifier function + * @return void + */ + public static function register_modifier($name, $callable) { + self :: $smarty -> registerPlugin("modifier", $name, $callable); + } + /** * Register a class usable from template files * @param string $class_name The class name