original_string: protected function getTermPermalink($TermRelativePath)
      {
          if (is_null($TermRelativePath)) {
              return;
          }
  
          $result = $TermRelativePath;
          $basename = basename($TermRelativePath);
  
          if ($basename === 'index.html') {
              $result = dirname($TermRelativePath);
  
              if ($result === '.') {
                  $result = '';
              }
          }
  
          return '/'.$result;
      }
code: protected function getTermPermalink($TermRelativePath)
      {
          if (is_null($TermRelativePath)) {
              return;
          }
  
          $result = $TermRelativePath;
          $basename = basename($TermRelativePath);
  
          if ($basename === 'index.html') {
              $result = dirname($TermRelativePath);
  
              if ($result === '.') {
                  $result = '';
              }
          }
  
          return '/'.$result;
      }
code_tokens: protected function getTermPermalink ( $ TermRelativePath ) { if ( is_null ( $ TermRelativePath ) ) { return ; } $ result = $ TermRelativePath ; $ basename = basename ( $ TermRelativePath ) ; if ( $ basename === 'index.html' ) { $ result = dirname ( $ TermRelativePath ) ; if ( $ result === '.' ) { $ result = '' ; } } return '/' . $ result ; }
docstring: Returns the permalink of a term relative-path-based.
  
  @param string $TermRelativePath The relative path of the term
  
  @return string
docstring_tokens: Returns the permalink of a term relative - path - based .