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

Triggered by Cms_Partial
Author LemonStand eCommerce Inc.

Event handler signature

public void event_onDeletePartial(Cms_Partial $partial)
$partial Cms_Partial specifies the partial object to be deleted.
Triggered before a partial is deleted. The event handler can throw an exception to prevent deletion of a specific partial.
public function subscribeEvents()
{
  Backend::$events->addEvent('cms:onDeletePartial', $this, 'partial_deletion_check');
}

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