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!");
}