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

Triggered by Cms_Template
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onDeleteTemplate(Cms_Template $template)
$template Cms_Template specifies the layout object to be deleted.
Triggered before a layout is deleted. The event handler can throw an exception to prevent deletion of a specific layout.
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onDeleteTemplate', $this, 'template_deletion_check');
}

public function template_deletion_check($template)
{
  if ($template->name == 'test')
    throw new Phpr_ApplicationException("You cannot delete this layout!");
}