original_string: public function get_plugintype_root($plugintype) {
  
          $plugintypepath = null;
          foreach (core_component::get_plugin_types() as $type => $fullpath) {
              if ($type === $plugintype) {
                  $plugintypepath = $fullpath;
                  break;
              }
          }
          if (is_null($plugintypepath)) {
              return null;
          }
          if (!is_dir($plugintypepath)) {
              return false;
          }
  
          return $plugintypepath;
      }
code: public function get_plugintype_root($plugintype) {
  
          $plugintypepath = null;
          foreach (core_component::get_plugin_types() as $type => $fullpath) {
              if ($type === $plugintype) {
                  $plugintypepath = $fullpath;
                  break;
              }
          }
          if (is_null($plugintypepath)) {
              return null;
          }
          if (!is_dir($plugintypepath)) {
              return false;
          }
  
          return $plugintypepath;
      }
code_tokens: public function get_plugintype_root ( $ plugintype ) { $ plugintypepath = null ; foreach ( core_component :: get_plugin_types ( ) as $ type => $ fullpath ) { if ( $ type === $ plugintype ) { $ plugintypepath = $ fullpath ; break ; } } if ( is_null ( $ plugintypepath ) ) { return null ; } if ( ! is_dir ( $ plugintypepath ) ) { return false ; } return $ plugintypepath ; }
docstring: Returns the full path of the root of the given plugin type
  
  Null is returned if the plugin type is not known. False is returned if
  the plugin type root is expected but not found. Otherwise, string is
  returned.
  
  @param string $plugintype
  @return string|bool|null
docstring_tokens: Returns the full path of the root of the given plugin type