Jump to content

Why is ProcessPageAdd::execute() method hookable?


pogidude
 Share

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...