original_string: 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'));
      }
code: 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'));
      }
code_tokens: 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' ) ) ; }
docstring: Deletes all tag areas, collections and instances associated with the plugin.
  
  @param string $pluginname
docstring_tokens: Deletes all tag areas collections and instances associated with the plugin .