mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Reformat documentation
This commit is contained in:
22
docs/en/ext/mods.md
Normal file
22
docs/en/ext/mods.md
Normal file
@@ -0,0 +1,22 @@
|
||||
Модификаторы [RU]
|
||||
============
|
||||
|
||||
|
||||
```
|
||||
$fenom->addModifier(string $modifier, callable $callback);
|
||||
```
|
||||
|
||||
* `$modifier` - название модификатора, которое будет использоваться в шаблоне
|
||||
* `$callback` - коллбек, который будет вызван для изменения данных
|
||||
|
||||
For example:
|
||||
|
||||
```smarty
|
||||
{$variable|my_modifier:$param1:$param2}
|
||||
```
|
||||
|
||||
```php
|
||||
$fenom->addModifier('my_modifier', function ($variable, $param1, $param2) {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
Reference in New Issue
Block a user