Tpl: add register_modifier() method
This commit is contained in:
parent
4d8c08fabd
commit
44fc339057
1 changed files with 10 additions and 0 deletions
10
src/Tpl.php
10
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
|
||||
|
|
Loading…
Reference in a new issue