Heya,
I'm working on a connector for the UserForms to send data to a third party service on submit. I'm just not sure how to get override/extend functions in PHP to make this possible.
Currently have a simple class
class ServiceConnector extends Extension
{
public function onAfterInit()
{
echo "<h1>TEST!</h1>";
}
}
and in a config.yml I've got
UserDefinedForm_Controller:
extensions:
- ServiceConnector
This works in the sense that TEST! is showing up each time a page where a userform is displayed (Testing I've got the extension at least partially correct), but how do I go about getting the actual data json array?
I thought I would have been able to 'extend' the process method from the userform controller but if I try and do something like
class ServiceConnector extends Extension
{
public function process($data, $form)
{
echo $this->owner->data
}
}
I get nothing, so assuming its not calling my version of the method? Same can be said for any method I try and extend/modify.