rizsti Posted January 31, 2014 Share Posted January 31, 2014 I'm trying to create a module that will execute functions when a button is pressed. What would be the best way to implement this? The options I've considered are: Using a Process and creating a page in the admin section of the website; Or perhaps creating a module and having a button on the settings page; There are probably other ways to do this that I haven't considered. I'd be open to suggestions. Thanks for any help Link to comment Share on other sites More sharing options...
Wanze Posted January 31, 2014 Share Posted January 31, 2014 Do you need to add functionality anywhere in the core, does the button you press already exist? If so, you want use a hook that is executed when the button is pressed. Otherwise, if you want to add your own custom logic/forms/buttons, you can use a Process Module. Link to comment Share on other sites More sharing options...
Soma Posted January 31, 2014 Share Posted January 31, 2014 Or a WireData module usually for autoload hooking modules. Process modules are usually for admin pages. But it would work too. Link to comment Share on other sites More sharing options...
rizsti Posted January 31, 2014 Author Share Posted January 31, 2014 Do you need to add functionality anywhere in the core, does the button you press already exist? If so, you want use a hook that is executed when the button is pressed. Otherwise, if you want to add your own custom logic/forms/buttons, you can use a Process Module. No, I don't need to add any core functionality and the button doesn't exist. I just want to create buttons with functions attached. Which hooks should I be looking into? This is sort of what I'm looking for (or a better way to do essentially this): Link to comment Share on other sites More sharing options...
Soma Posted February 1, 2014 Share Posted February 1, 2014 Modules can have configurations where you have the buttons. This is already there if you implement the configurable interface. You add them and check for them via input name. There's many modules that have this already so you should study them. Also a possibility is to create a custom admin page using a process module so you have your own screen to add forms and buttons and do whatever you like with using api. ProcessHello is a example of such a module. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now