original_string: public function plugintype_name($type) {
  
          if (get_string_manager()->string_exists('type_' . $type, 'core_plugin')) {
              // For most plugin types, their names are defined in core_plugin lang file.
              return get_string('type_' . $type, 'core_plugin');
  
          } else if ($parent = $this->get_parent_of_subplugin($type)) {
              // If this is a subplugin, try to ask the parent plugin for the name.
              if (get_string_manager()->string_exists('subplugintype_' . $type, $parent)) {
                  return $this->plugin_name($parent) . ' / ' . get_string('subplugintype_' . $type, $parent);
              } else {
                  return $this->plugin_name($parent) . ' / ' . $type;
              }
  
          } else {
              return $type;
          }
      }
code: public function plugintype_name($type) {
  
          if (get_string_manager()->string_exists('type_' . $type, 'core_plugin')) {
              // For most plugin types, their names are defined in core_plugin lang file.
              return get_string('type_' . $type, 'core_plugin');
  
          } else if ($parent = $this->get_parent_of_subplugin($type)) {
              // If this is a subplugin, try to ask the parent plugin for the name.
              if (get_string_manager()->string_exists('subplugintype_' . $type, $parent)) {
                  return $this->plugin_name($parent) . ' / ' . get_string('subplugintype_' . $type, $parent);
              } else {
                  return $this->plugin_name($parent) . ' / ' . $type;
              }
  
          } else {
              return $type;
          }
      }
code_tokens: public function plugintype_name ( $ type ) { if ( get_string_manager ( ) -> string_exists ( 'type_' . $ type , 'core_plugin' ) ) { // For most plugin types, their names are defined in core_plugin lang file. return get_string ( 'type_' . $ type , 'core_plugin' ) ; } else if ( $ parent = $ this -> get_parent_of_subplugin ( $ type ) ) { // If this is a subplugin, try to ask the parent plugin for the name. if ( get_string_manager ( ) -> string_exists ( 'subplugintype_' . $ type , $ parent ) ) { return $ this -> plugin_name ( $ parent ) . ' / ' . get_string ( 'subplugintype_' . $ type , $ parent ) ; } else { return $ this -> plugin_name ( $ parent ) . ' / ' . $ type ; } } else { return $ type ; } }
docstring: Returns a localized name of a plugin typed in singular form
  
  Most plugin types define their names in core_plugin lang file. In case of subplugins,
  we try to ask the parent plugin for the name. In the worst case, we will return
  the value of the passed $type parameter.
  
  @param string $type the type of the plugin, e.g. mod or workshopform
  @return string
docstring_tokens: Returns a localized name of a plugin typed in singular form