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

cms:onSetDefaultTheme event

Triggered by Cms_Theme
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onSetDefaultTheme(Cms_Theme $old_theme, Cms_Theme $new_theme)
$old_theme Cms_Theme the old default theme object.
$new_theme Cms_Theme the new default theme object.
Triggered when a default theme is changed by a user. The handler method should accept two parameters - the old and new default theme objects. You can throw an exception in the handler to stop the operation.
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onSetDefaultTheme', $this, 'set_default_theme');
}

public function set_default_theme($old, $new)
{
  // Do something
}