Jump to content

getting edit page action in module


benbyf
 Share

Recommended Posts

Hi, I've managed to add a new button to the edit page but i'm finding it difficult to catch when it's been clicked. I've attached an image with the new publish later button with the name pdp_pub_later, but when I message() the action its always ProcessPageEdit – who would I find out that my new button has been clicked?

public function init() {
	$this->addHookAfter("ProcessPageEdit::execute", $this, 'publishLaterAndRedirect');
}

public function publishLaterAndRedirect(HookEvent $e){
	$page = $e->page;
	$action = $e->action;
	$this->message('action:' . $this->process);
}

Screenshot 2016-08-05 15.23.36.png

  • Like 1
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

×
×
  • Create New...