Massive upgrade
This commit is contained in:
parent
99a9ed919e
commit
c1a3437f9b
396 changed files with 29083 additions and 31939 deletions
17
core/template/src/Compile/Modifier/Nl2brModifierCompiler.php
Normal file
17
core/template/src/Compile/Modifier/Nl2brModifierCompiler.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace Smarty\Compile\Modifier;
|
||||
/**
|
||||
* Smarty nl2br modifier plugin
|
||||
* Type: modifier
|
||||
* Name: nl2br
|
||||
* Purpose: insert HTML line breaks before all newlines in a string
|
||||
*
|
||||
*/
|
||||
|
||||
class Nl2brModifierCompiler extends Base {
|
||||
|
||||
public function compile($params, \Smarty\Compiler\Template $compiler) {
|
||||
return 'nl2br((string) ' . $params[0] . ', (bool) ' . ($params[1] ?? true) . ')';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue