Extending Calculated Value Datatype Expression #17751
Unanswered
cancan101
asked this question in
Q&A / Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How would I go about adding new functions to a Calculated Value Datatype of Expression type? Symfony has documentation on this approach, but I would need to hook into the
ExpressionLanguage
used by Pimcore for the calculated field.Specifically I am looking to register various string methods, similar to what is done here: https://github.com/coreshop/CoreShop/blob/35e36555435bae6f828322c957e0a4f9478149bb/src/CoreShop/Component/Pimcore/ExpressionLanguage/PHPFunctionsProvider.php#L29-L57
It looks like we would need to register here, though there does not seem like anyway to hook the registration: https://github.com/pimcore/pimcore/blob/02298c39f5a98f4be01c1b5aa33e947e9a5be90b/models/DataObject/Service.php#L1448C29-L1459
Beta Was this translation helpful? Give feedback.
All reactions