public static function uninstall($pluginname) {
        global $DB;

        list($a, $b) = core_component::normalize_component($pluginname);
        if (empty($b) || $a === 'core') {
            throw new coding_exception('Core component can not be uninstalled');
        }
        $component = $a . '_' . $b;

        core_tag_tag::delete_instances($component);

        $DB->delete_records('tag_area', array('component' => $component));
        $DB->delete_records('tag_coll', array('component' => $component));
        cache::make('core', 'tags')->delete_many(array('tag_area', 'tag_coll'));
    }
public static function uninstall($pluginname) {
        global $DB;

        list($a, $b) = core_component::normalize_component($pluginname);
        if (empty($b) || $a === 'core') {
            throw new coding_exception('Core component can not be uninstalled');
        }
        $component = $a . '_' . $b;

        core_tag_tag::delete_instances($component);

        $DB->delete_records('tag_area', array('component' => $component));
        $DB->delete_records('tag_coll', array('component' => $component));
        cache::make('core', 'tags')->delete_many(array('tag_area', 'tag_coll'));
    }
public static function uninstall ( $ pluginname ) { global $ DB ; list ( $ a , $ b ) = core_component :: normalize_component ( $ pluginname ) ; if ( empty ( $ b ) || $ a === 'core' ) { throw new coding_exception ( 'Core component can not be uninstalled' ) ; } $ component = $ a . '_' . $ b ; core_tag_tag :: delete_instances ( $ component ) ; $ DB -> delete_records ( 'tag_area' , array ( 'component' => $ component ) ) ; $ DB -> delete_records ( 'tag_coll' , array ( 'component' => $ component ) ) ; cache :: make ( 'core' , 'tags' ) -> delete_many ( array ( 'tag_area' , 'tag_coll' ) ) ; }
Deletes all tag areas, collections and instances associated with the plugin.

@param string $pluginname
Deletes all tag areas collections and instances associated with the plugin .