This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

backend:onBeforeRemoteEvent event

Triggered by Backend_Controller
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onBeforeRemoteEvent(Backend_Controller $controller, string $event_name)
$controller Backend_Controller specifies the Administration Area controller object.
$event_name string specifies the AJAX event name.
Triggered before an Administration Area AJAX request is handled. In the event handler you can throw an exception to cancel the default event processing. Example:
public function subscribeEvents()
{
  Backend::$events->addEvent('backend:onBeforeRemoteEvent', $this, 'handle_remote_event');
}

public function handle_remote_event($controller, $event)
{
 if ($controller instanceof Cms_Themes && $event == 'enable_onApply')
   throw new Phpr_ApplicationException('We\'re sorry, you manage CMS themes .');
}