pogidude Posted June 18, 2013 Share Posted June 18, 2013 Just wondering what the idea behind why ProcessPageAdd::___execute() method is hookable? Example of situation where I might want to use it? Link to comment Share on other sites More sharing options...
Soma Posted June 18, 2013 Share Posted June 18, 2013 Well no reason behind I think, all core Process modules execute() are hookable whether useful or not. I this case you could replace the add form with your own, what else But to be honest it would be better if buildForm() would be hookable, but nobody needed it so far so it's not. The thing is the execute() returns the form rendered already so you can't manipulate it using OOP. 1 Link to comment Share on other sites More sharing options...
Wanze Posted June 18, 2013 Share Posted June 18, 2013 Soma's right. Every Process module extends from the abstract class Process and overwrites the execute method which is hookable. This might not be useful for ProcessPageAdd, but for other modules. In: /wire/core/Process.php /** * Execute this Process and return the output * * @return string * */ public function ___execute() { } 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