Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
onUndefinedFilter example
public
function
configure
(
Environment
$environment
)
{
$environment
->
getExtension
(
CoreExtension::
class
)
->
setDateFormat
(
$this
->dateFormat,
$this
->intervalFormat
)
;
if
(
null !==
$this
->timezone
)
{
$environment
->
getExtension
(
CoreExtension::
class
)
->
setTimezone
(
$this
->timezone
)
;
}
$environment
->
getExtension
(
CoreExtension::
class
)
->
setNumberFormat
(
$this
->decimals,
$this
->decimalPoint,
$this
->thousandsSeparator
)
;
// wrap UndefinedCallableHandler in closures for lazy-autoloading
$environment
->
registerUndefinedFilterCallback
(
fn
(
$name
)
=> UndefinedCallableHandler::
onUndefinedFilter
(
$name
)
)
;
$environment
->
registerUndefinedFunctionCallback
(
fn
(
$name
)
=> UndefinedCallableHandler::
onUndefinedFunction
(
$name
)
)
;
}
}