original_string: protected function get_renderer($maildigest, $html = false) {
          global $PAGE;
  
          $type = $maildigest == 2 ? 'emaildigestbasic' : 'emaildigestfull';
          $target = $html ? 'htmlemail' : 'textemail';
  
          if (!isset($this->renderers[$target][$type])) {
              $this->renderers[$target][$type] = $PAGE->get_renderer('mod_forum', $type, $target);
          }
  
          return $this->renderers[$target][$type];
      }
code: protected function get_renderer($maildigest, $html = false) {
          global $PAGE;
  
          $type = $maildigest == 2 ? 'emaildigestbasic' : 'emaildigestfull';
          $target = $html ? 'htmlemail' : 'textemail';
  
          if (!isset($this->renderers[$target][$type])) {
              $this->renderers[$target][$type] = $PAGE->get_renderer('mod_forum', $type, $target);
          }
  
          return $this->renderers[$target][$type];
      }
code_tokens: protected function get_renderer ( $ maildigest , $ html = false ) { global $ PAGE ; $ type = $ maildigest == 2 ? 'emaildigestbasic' : 'emaildigestfull' ; $ target = $ html ? 'htmlemail' : 'textemail' ; if ( ! isset ( $ this -> renderers [ $ target ] [ $ type ] ) ) { $ this -> renderers [ $ target ] [ $ type ] = $ PAGE -> get_renderer ( 'mod_forum' , $ type , $ target ) ; } return $ this -> renderers [ $ target ] [ $ type ] ; }
docstring: Helper to fetch the required renderer, instantiating as required.
  
  @param   int     $maildigest The type of mail digest being sent
  @param   bool    $html Whether to fetch the HTML renderer
  @return  \core_renderer
docstring_tokens: Helper to fetch the required renderer instantiating as required .