Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getTwigFilters example
$match
[
2
]
?
eval
(
$match
[
2
]
.';'
)
:
[
]
)
;
$twig
=
new
Environment
(
$loader
,
$config
)
;
$twig
->
addGlobal
(
'global', 'global'
)
;
foreach
(
$this
->
getRuntimeLoaders
(
)
as
$runtimeLoader
)
{
$twig
->
addRuntimeLoader
(
$runtimeLoader
)
;
}
foreach
(
$this
->
getExtensions
(
)
as
$extension
)
{
$twig
->
addExtension
(
$extension
)
;
}
foreach
(
$this
->
getTwigFilters
(
)
as
$filter
)
{
$twig
->
addFilter
(
$filter
)
;
}
foreach
(
$this
->
getTwigTests
(
)
as
$test
)
{
$twig
->
addTest
(
$test
)
;
}
foreach
(
$this
->
getTwigFunctions
(
)
as
$function
)
{
$twig
->
addFunction
(
$function
)
;
}