/** * Uninstall the module. * * @return bool */ public function uninstall() { // drop table \DoctrineHelper::dropSchema($this->entityManager, array('ExampleModule\\Entity\\User', 'ExampleModule\\Entity\\UserCategory', 'ExampleModule\\Entity\\UserAttribute', 'ExampleModule\\Entity\\UserMetadata')); // remove all module vars $this->delVars(); return true; }
public function uninstall() { // @todo Also delete media files? \DoctrineHelper::dropSchema($this->entityManager, static::getEntities()); \HookUtil::unregisterProviderBundles($this->version->getHookProviderBundles()); \HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles()); $this->delVars(); return true; }
/** * @return bool */ public function uninstall() { try { DoctrineHelper::dropSchema($this->entityManager, array('Dashboard_Entity_UserWidget', 'Dashboard_Entity_Widget')); } catch (Exception $e) { return false; } EventUtil::unregisterPersistentModuleHandlers($this->name); return true; }
/** * Uninstall the module. * * This function is only ever called once during the lifetime of a particular * module instance. * * @return bool True on success, false otherwise. */ public function uninstall() { // drop table DoctrineHelper::dropSchema($this->entityManager, array('ExampleDoctrine_Entity_User', 'ExampleDoctrine_Entity_UserCategory', 'ExampleDoctrine_Entity_UserAttribute', 'ExampleDoctrine_Entity_UserMetadata')); // remove all module vars $this->delVars(); // delete categories CategoryRegistryUtil::deleteEntry('ExampleDoctrine'); CategoryUtil::deleteCategoriesByPath('/__SYSTEM__/Modules/ExampleDoctrine', 'path'); // Deletion successful return true; }
/** * Delete the Search module * This function is only ever called once during the lifetime of a particular * module instance */ public function uninstall() { try { \DoctrineHelper::dropSchema($this->entityManager, array('SearchModule\\Entity\\SearchResultEntity', 'SearchModule\\Entity\\SearchStatEntity')); } catch (\Exception $e) { return false; } // Delete any module variables $this->delVars(); // unregister event handlers EventUtil::unregisterPersistentModuleHandlers('Search'); // Deletion successful return true; }
/** * Uninstall Reviews. * * @return boolean True on success, false otherwise. */ public function uninstall() { // delete stored object workflows $result = Zikula_Workflow_Util::deleteWorkflowsForModule($this->getName()); if ($result === false) { return LogUtil::registerError($this->__f('An error was encountered while removing stored object workflows for the %s extension.', array($this->getName()))); } try { DoctrineHelper::dropSchema($this->entityManager, $this->listEntityClasses()); } catch (\Exception $e) { if (System::isDevelopmentMode()) { return LogUtil::registerError($this->__('Doctrine Exception: ') . $e->getMessage()); } return LogUtil::registerError($this->__f('An error was encountered while dropping tables for the %s extension.', array($this->name))); } // unregister persistent event handlers EventUtil::unregisterPersistentModuleHandlers($this->name); // unregister hook subscriber bundles HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles()); // remove all module vars $this->delVars(); // remove category registry entries ModUtil::dbInfoLoad('Categories'); DBUtil::deleteWhere('categories_registry', 'modname = \'' . $this->name . '\''); // remove all thumbnails $manager = $this->getServiceManager()->getService('systemplugin.imagine.manager'); $manager->setModule($this->name); $manager->cleanupModuleThumbs(); // remind user about upload folders not being deleted $uploadPath = FileUtil::getDataDirectory() . '/' . $this->name . '/'; LogUtil::registerStatus($this->__f('The upload directories at [%s] can be removed manually.', $uploadPath)); // uninstallation successful return true; }
/** * Uninstall MUBoard. * * @return boolean True on success, false otherwise. */ public function uninstall() { // delete stored object workflows $result = Zikula_Workflow_Util::deleteWorkflowsForModule($this->getName()); if ($result === false) { return LogUtil::registerError($this->__f('An error was encountered while removing stored object workflows for the %s module.', array($this->getName()))); } try { DoctrineHelper::dropSchema($this->entityManager, $this->listEntityClasses()); } catch (Exception $e) { if (System::isDevelopmentMode()) { LogUtil::registerError($this->__('Doctrine Exception: ') . $e->getMessage()); } return LogUtil::registerError($this->__f('An error was encountered while dropping the tables for the %s module.', array($this->getName()))); } // unregister persistent event handlers EventUtil::unregisterPersistentModuleHandlers('MUBoard'); // unregister hook subscriber bundles HookUtil::unregisterSubscriberBundles($this->version->getHookSubscriberBundles()); // remove all module vars $this->delVars(); // deletion successful return true; }
/** * delete the Admin module * This function is only ever called once during the lifetime of a particular * module instance * @return bool true if deletetion succcesful, false otherwise */ public function uninstall() { // drop tables try { DoctrineHelper::dropSchema($this->entityManager, array('Admin_Entity_AdminCategory', 'Admin_Entity_AdminModule')); } catch (Exception $e) { return false; } $this->delVars(); // Deletion successful return true; }
/** * @AfterScenario */ public function dropSchema() { $this->doctrineHelper->dropSchema(); }