Custom Eel Helpers
Eel Helpers provide methods that can be used inside of Eel expressions. That is mostly used to extend the capabilities for data-aquisition and processing of Fusion.
#Define the class
The first step is to create the EelHelper class. Every Helper has to implement the interface Neos\Eel\ProtectedContextAwareInterface.
Classes/Eel/Helper/ExampleHelper.php
#Register the helper
Afterwards the name of the Helper has to be registered for usage in Fusion in the Settings.yaml of the package:
Configuration/Settings.yaml
Neos:
Fusion:
defaultContext:
'Vendor.Site.Example': 'Vendor\Site\Eel\Helper\ExampleHelper'
#Usage
In Fusion you can call the methods of the helper inside of EelExpressions:
fusion
exampleEelValue = ${Vendor.Site.Example.wrapInCurlyBrackets('Hello World')}