Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

call function in different controller


Reply


465 Views

Avatar
Lens-Art

Community Member, 4 Posts

31 March 2012 at 3:22am

I'm new to Silverstripe and I'm trying to extend an existing site, so sorry if the answer to this question is obvious.
I'm trying to connect via TCP to an external device if an event happens.
I've made a controller for this which is in a different php file than the one in which the event happens.

Can I call my TCP connect function with something like controller::socketConnectController()?
Or do I have to redirect to the controller via a director::addrules?

Maybe the way I implement this is not rigth at all but this, is what I though would be a good solution.
I hope it is clear what I want :)