Removes an existing Extention plugin from the library
@param {string} ext_module_id is the id of the module to remove.
@return {boolean} True the plugin was successfully removed.
328139
function RemovePlugin (ext_module_id) {
  let copy = plugins[ext_module_id]

  let runPreWorkflowFunctions = function () {
    if (!plugins[ext_module_id].PreRemovePlugin) throw new Error('Error: PreRemovePlugin function must be implemented.')
    plugins[ext_module_id].PreRemovePlugin()
  }

  let runPostWorkflowFunctions = function () {
    if (!copy.PostRemovePlugin) throw new Error('Error: PostRemovePlugin function must be implemented.')
    copy.PostRemovePlugin(module.exports)
  }

  runPreWorkflowFunctions()
  delete plugins[ext_module_id]
  log.info('Removed Plugin', ext_module_id)
  runPostWorkflowFunctions()

  return true
}
615037
function(plugin) {
            var ns = plugin, 
                plugins = this._plugins;
    
            if (L.isFunction(plugin)) {
                ns = plugin.NS;
                if (ns && (!plugins[ns] || plugins[ns] !== plugin)) {
                    ns = null;
                }
            }
    
            if (ns) {
                if (this[ns]) {
                    this[ns].destroy();
                    delete this[ns];
                }
                if (plugins[ns]) {
                    delete plugins[ns];
                }
            }
        }
722733
function _cmdRemove(extensionDir, callback, pCallback) {
    fs.remove(extensionDir, function (err) {
        if (err) {
            callback(err);
        } else {
            callback(null);
        }
    });
}
752666
function removeThis( $id, $currentVersion = null )
    {
        $dataType = $this->dataType();
        if ( !$dataType )
            return false;
        $dataType->deleteStoredObjectAttribute( $this, $currentVersion );
        if( $currentVersion == null )
        {
            eZPersistentObject::removeObject( eZContentObjectAttribute::definition(),
                                              array( "id" => $id ) );
        }
        else
        {
            eZPersistentObject::removeObject( eZContentObjectAttribute::definition(),
                                              array( "id" => $id,
                                                     "version" => $currentVersion ) );
        }
    }
68339
def delete_extension_by_id(self, extension_id, version=None):
        
        route_values = {}
        if extension_id is not None:
            route_values['extensionId'] = self._serialize.url('extension_id', extension_id, 'str')
        query_parameters = {}
        if version is not None:
            query_parameters['version'] = self._serialize.query('version', version, 'str')
        self._send(http_method='DELETE',
                   location_id='a41192c8-9525-4b58-bc86-179fa549d80d',
                   version='5.0-preview.2',
                   route_values=route_values,
                   query_parameters=query_parameters)
374118
public void removeExtension() {

		deleteRelationships();

		geoPackage.deleteTable(StyleTable.TABLE_NAME);

		geoPackage.deleteTable(IconTable.TABLE_NAME);

		try {
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete Feature Style extension. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
437929
static function remove( $classID )
    {
        $contentClass = eZContentClass::fetch( $classID );

        if ( $contentClass == null or !$contentClass->isRemovable() )
            return false;

        // Remove all objects
        $contentObjects = eZContentObject::fetchSameClassList( $classID );
        foreach ( $contentObjects as $contentObject )
        {
            eZContentObjectOperations::remove( $contentObject->attribute( 'id' ) );
        }

        if ( count( $contentObjects ) == 0 )
            eZContentObject::expireAllViewCache();

        eZContentClassClassGroup::removeClassMembers( $classID, 0 );
        eZContentClassClassGroup::removeClassMembers( $classID, 1 );

        // Fetch real version and remove it
        $contentClass->remove( true );

        // Fetch temp version and remove it
        $tempDeleteClass = eZContentClass::fetch( $classID, true, 1 );
        if ( $tempDeleteClass != null )
            $tempDeleteClass->remove( true, 1 );

        return true;
    }
937787
public function unregisterAdapter($moduleId)
    {

        $registry = $this->getRegistry();
        $config = [];
        if ($registry->isRegistered(self::REGISTRY_ENTRY_KEY)) {
            $config = $registry->get(self::REGISTRY_ENTRY_KEY);
        }

        if (isset($config[self::PREVIEWERS_KEY]) && isset($config[self::PREVIEWERS_KEY][$moduleId])) {
            unset($config[self::PREVIEWERS_KEY][$moduleId]);
            $registry->set(self::REGISTRY_ENTRY_KEY, $config);
            return true;
        }
        return false;
    }
1195134
def remove(element_id)
      unless is_parent_layout?
        return parent_layout.remove(element_id)
      end
      removed = forget(element_id)
      context(self.view) do
        removed.each do |element|
          self.apply(:remove_child, element)
        end
      end
      removed
    end
281898
function removeThis( $id = false )
    {
        $db = eZDB::instance();
        $db->begin();
        foreach ( $this->attribute( 'limitations' ) as $limitation )
        {
            $limitation->removeThis();
        }
        $db->query( "DELETE FROM ezpolicy
                     WHERE id='" . $db->escapeString( $this->attribute( 'id' ) ) . "'" );
        $db->commit();
    }
1159255
function _removeExtension($id, $path = null)
    {
        $extensions = &$this->_extensions($this->currentCert, $path);

        if (!is_array($extensions)) {
            return false;
        }

        $result = false;
        foreach ($extensions as $key => $value) {
            if ($value['extnId'] == $id) {
                unset($extensions[$key]);
                $result = true;
            }
        }

        $extensions = array_values($extensions);
        return $result;
    }
1173398
public function deleteModuleEntry($element, $client=null)
	{
		if ($this->baseDb->tableExists('#__extensions'))
		{
			// Delete module entry
			$query = "DELETE FROM `#__extensions` WHERE `element` = '{$element}'" . ((isset($client)) ? " AND `client_id` = " . $this->baseDb->quote($client) : '');
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed extension entry for module "%s"', $element));

			// See if entries are present in #__modules table as well
			$query = "SELECT `id` FROM `#__modules` WHERE `module` = '{$element}'" . ((isset($client)) ? " AND `client_id` = " . $this->baseDb->quote($client) : '');
			$this->baseDb->setQuery($query);
			$ids = $this->baseDb->loadColumn();

			if ($ids && count($ids) > 0)
			{
				// Delete modules and module menu entries
				$query = "DELETE FROM `#__modules` WHERE `id` IN (" . implode(',', $ids) . ")";
				$this->baseDb->setQuery($query);
				$this->baseDb->query();

				$query = "DELETE FROM `#__modules_menu` WHERE `moduleid` IN (" . implode(',', $ids) . ")";
				$this->baseDb->setQuery($query);
				$this->baseDb->query();

				$this->log(sprintf('Removed module/menu entries for module "%s"', $element));
			}

			return true;
		}
		else
		{
			$query = "SELECT `id` FROM `#__modules` WHERE `module` = '{$element}'" . ((isset($client)) ? " AND `client_id` = " . $this->baseDb->quote($client) : '');
			$this->baseDb->setQuery($query);
			$ids = $this->baseDb->loadColumn();

			if ($ids && count($ids) > 0)
			{
				// Delete modules and module menu entries
				$query = "DELETE FROM `#__modules` WHERE `id` IN (" . implode(',', $ids) . ")";
				$this->baseDb->setQuery($query);
				$this->baseDb->query();

				$query = "DELETE FROM `#__modules_menu` WHERE `moduleid` IN (" . implode(',', $ids) . ")";
				$this->baseDb->setQuery($query);
				$this->baseDb->query();

				$this->log(sprintf('Removed module/menu entries for module "%s"', $element));
			}

			return true;
		}

		return false;
	}
1071926
public void removeExtension() {

		try {
			if (extensionsDao.isTableExists()) {
				extensionsDao.deleteByExtension(EXTENSION_NAME);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete CRS WKT extension. GeoPackage: "
							+ geoPackage.getName(), e);
		}

	}
93643
public void deleteModule(final String moduleId) {
        final DbModule module = getModule(moduleId);
        repositoryHandler.deleteModule(module.getId());

        for (final String gavc : DataUtils.getAllArtifacts(module)) {
            repositoryHandler.deleteArtifact(gavc);
        }
    }
698823
function moduleSize(id, paths) {
    var path = id;
    var extension = '.js';
    // Use `paths:` to resolve an alias.
    if (paths[id]) {
        path = paths[id];
    }
    // Does the dependency reference a plugin?
    if (path.indexOf('!') !== -1) {
        // Split into plugin and path.
        var pathParts = path.split('!');
        // Often, the plugin maps to the extension it handles.
        extension = '.' + pathParts[0];
        path = pathParts[1];
    }
    // Try to get the file at the path.
    var stats;
    try {
        stats = fs.statSync(path);
        return stats['size'];
    }
    catch(e) {}

    // Didn't find it? Let's try again with the extension added.
    if (path.slice(-extension.length) !== extension) {
        path = path + extension;
    }
    try {
        stats = fs.statSync(path);
        return stats['size'];
    }
    catch(e) {}

    // Still didn't find the file.
    return null;
}
546453
static function removeByObjectId( $contentobjectID, $contentobjectAttributeId = null )
    {
        $cond = array( 'contentobject_id' => $contentobjectID );
        if ( $contentobjectAttributeId !== null )
        {
            $cond['contentobject_attribute_id'] = $contentobjectAttributeId;
        }
        eZPersistentObject::removeObject( self::definition(), $cond );
    }
808366
public function destroy($id)
    {
        $extension = $this->repository->findOrFail($id);
        if ($extension->protected) {
            return $this->notifyError(trans('cms::extension.protected'));
        }

        if ($this->repository->uninstall($id)) {
            flash()->success(trans('cms::extension.deleted', compact('id')));
        } else {
            flash()->error(trans('cms::extension.error', compact('id')));
        }

        return back();
    }