Deactivates/unregisters all recipes of the current plugin, if this plugin gets deactivated.
6470
def __deactivate_recipes(self, plugin, *args, **kwargs):
        
        recipes = self.get()
        for recipe in recipes.keys():
            self.unregister(recipe)
713442
public static void unregister(ProteinModification modification) {
		if (modification==null) throw new IllegalArgumentException("modification == null!");

		registry.remove(modification);

		byId.remove(modification.getId());

		Set<ProteinModification> mods;

		mods = byResidId.get(modification.getResidId());
		if (mods!=null) mods.remove(modification);

		mods = byPsimodId.get(modification.getPsimodId());
		if (mods!=null) mods.remove(modification);

		mods = byPdbccId.get(modification.getPdbccId());
		if (mods!=null) mods.remove(modification);

		for (String keyword : modification.getKeywords()) {
			mods = byKeyword.get(keyword);
			if (mods!=null) mods.remove(modification);
		}

		ModificationCondition condition = modification.getCondition();
		List<Component> comps = condition.getComponents();
		for (Component comp : comps) {
			mods = byComponent.get(comp);
			if (mods!=null) mods.remove(modification);
		}

		byCategory.get(modification.getCategory()).remove(modification);
		byOccurrenceType.get(modification.getOccurrenceType()).remove(modification);
	}
557289
def _post_deactivate_injection(self):
        
        # Lets be sure that active is really set to false.
        self.active = False
        self.app.signals.send("plugin_deactivate_post", self)
        # After all receivers are handled. We start to clean up signals and receivers of this plugin
        # Attention: This signal clean must not be called via a signal (like in other patterns),
        # because the call order of receivers is not clear and a signal/receiver clean up would prohibit the call
        # of all "later" receivers.
        self.signals.deactivate_plugin_signals()
1074614
public static function uninstall()
	{
		$results = array();

		//see if any mods from jfusion plugins need to be removed
		$plugins = Factory::getPlugins('all', false, 0);
		foreach($plugins as $plugin) {
			$model = new Plugin();
			$result = $model->uninstall($plugin->name);

			$r = new stdClass();
			$result['status'] = 1;
			$r->status = $result['status'];

			if (!$r->status) {
				$r->message = Text::_('UNINSTALL') . ' ' . $plugin->name . ' ' . Text::_('FAILED');
			} else {
				$r->message = Text::_('UNINSTALL') . ' ' . $plugin->name . ' ' . Text::_('SUCCESS');
			}

			$results[] = $r;
		}

		//remove the jfusion tables.
		$db = Factory::getDBO();
		$query = 'DROP TABLE IF EXISTS #__jfusion';
		$db->setQuery($query);
		$db->execute();

		$query = 'DROP TABLE IF EXISTS #__jfusion_sync';
		$db->setQuery($query);
		$db->execute();

		$query = 'DROP TABLE IF EXISTS #__jfusion_sync_details';
		$db->setQuery($query);
		$db->execute();

		$query = 'DROP TABLE IF EXISTS #__jfusion_users';
		$db->setQuery($query);
		$db->execute();
		return $results;
	}
1278243
def release_plugin(self, name):
        
        plugin = self._active_plugins[name]
        if id(plugin) in self._provided_by_preset:
            self._provided_by_preset.remove(id(plugin))

        del self._active_plugins[name]
        delattr(self, name)
544290
public void deactivate(ComponentContext context) {
        if (contextRef.get() == null) {
            // Components are only deactivated if they activate successfully,
            // and component instances are discarded after being deactivated.
            // This is either DS or programmer error.
            throw new IllegalStateException("not activated");
        }

        this.contextRef.set(null);
    }
941507
public synchronized void deactivate() {
        // Allow garbage collection of all slots reserved by this component.
        // Clean up all the metadata used by the slots.
        for (MetaDataSlotImpl slot : slots) {
            MetaDataManager<?, ?> manager = (MetaDataManager<?, ?>) slot.getManager();
            manager.destroyMetaDataSlot(slot);
        }
        slots = null;
    }
888788
synchronized void unregister() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "unregister", this);
        }
        if (registration != null) {
            registration.unregister();
            registration = null;
        }
    }
1149390
def unload_plugin(self, name):
        
        self._logger.debug("Unloading {}.".format(name))

        self._logger.debug("Removing plugin instance.")
        del self._plugins[name]

        self._logger.debug("Unloading module.")
        del self._modules[name]

        self._logger.debug("Unloading manifest...")
        manifest = self.get_manifest(name)
        self._manifests.remove(manifest)

        self._logger.debug("{} unloaded.".format(name))
320146
public function unregisterPlugin($plugin)
    {
        if (false !== strpos($plugin, '_')) {
            foreach ($this->_plugins as $key => $_plugin) {
                if ($plugin == get_class($_plugin)) {
                    unset($this->_plugins[$key]);
                }
            }
        } else {
            $plugin = strtolower($plugin);
            if (isset($this->_plugins[$plugin])) {
                unset($this->_plugins[$plugin]);
            }
        }
        return $this;
    }
344159
public function uninstall()
    {
        $_POST['selected'] = [];

        foreach ((array) $this->plugin as $plugin) {
            $_POST['selected'][] = $plugin->name;
        }

        $_POST['edit_method'] = 'delete';
        ob_start();
        plugin_multi_edit();
        ob_end_clean();
    }
1269341
public void deactivate() {
        active.set(false);
        if (!(conceptQueue.isEmpty() && roleQueue.isEmpty() && featureQueue.isEmpty())) {
            if (activate()) {
                parentTodo.add(this);
            }
        }
    }
84113
public function unregister()
    {
        $unregisterConfig = $this->config->getSubConfig(self::UNREGISTER);
        array_map('unregister_widget', $unregisterConfig->getArrayCopy());
    }
656097
function unregister() {
    if (!applicationCurrent) {
        return;
    }
    applicationCurrent.stop();

    EVENTS.forEach(function (event) {
        process.removeListener(event, currentHandlers[event]);
    });

    applicationCurrent = null;
    currentHandlers = {};
}
522955
private function unregister() {
        if ($this->db) {
            $this->db->recordset_closed($this);
            $this->db = null;
        }
    }
207867
@Override
    public void stopPlugins() {
        // stop started plugins in reverse order
        Collections.reverse(startedPlugins);
        Iterator<PluginWrapper> itr = startedPlugins.iterator();
        while (itr.hasNext()) {
            PluginWrapper pluginWrapper = itr.next();
            PluginState pluginState = pluginWrapper.getPluginState();
            if (PluginState.STARTED == pluginState) {
                try {
                    log.info("Stop plugin '{}'", getPluginLabel(pluginWrapper.getDescriptor()));
                    pluginWrapper.getPlugin().stop();
                    pluginWrapper.setPluginState(PluginState.STOPPED);
                    itr.remove();

                    firePluginStateEvent(new PluginStateEvent(this, pluginWrapper, pluginState));
                } catch (PluginException e) {
                    log.error(e.getMessage(), e);
                }
            }
        }
    }
716533
def unregister(self, plugin=None, name=None):
        
        if name is None:
            assert plugin is not None, "one of name or plugin needs to be specified"
            name = self.get_name(plugin)

        if plugin is None:
            plugin = self.get_plugin(name)

        # if self._name2plugin[name] == None registration was blocked: ignore
        if self._name2plugin.get(name):
            del self._name2plugin[name]

        for hookcaller in self._plugin2hookcallers.pop(plugin, []):
            hookcaller._remove_plugin(plugin)

        return plugin