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:onGetActiveTheme event

Triggered by Cms_Theme
Author LemonStand eCommerce Inc.

Event handler signature

public Cms_Theme event_onGetActiveTheme()
{return} Cms_Theme returns the theme object. Returns NULL if the default theme should be used.
Triggered when LemonStand determines an active CMS theme. Use this event to force a specific theme to be used, ignoring the currently default CMS theme. The handler should return a Cms_Theme object representing a theme which should be used.
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onGetActiveTheme', $this, 'get_active_theme');
}

public function get_active_theme()
{
  return Cms_Theme::create()->find_by_code('utility');
}