/**
* Helper function to remove a plugins form or only its translations (if removeData == false)
*
* @param bool $removeData
*
* @throws Exception
*/
private function removeForm(Shopware_Components_Plugin_Bootstrap
$bootstrap,
$removeData = true
) { if (!
$bootstrap->
hasForm()) { return;
} if ($removeData) { $em =
$this->
Application()->
Models();
$form =
$bootstrap->
Form();
if ($form->
getId()) { $em->
remove($form);
} else { $em->
detach($form);
}