original_string: public function rewrite_pluginfile_urls(array $subcontext, $component, $filearea, $itemid, $text) : string {
          // Need to take into consideration the subcontext to provide the full path to this file.
          $subcontextpath = '';
          if (!empty($subcontext)) {
              $subcontextpath = DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $subcontext);
          }
          $path = $this->get_context_path();
          $path = implode(DIRECTORY_SEPARATOR, $path) . $subcontextpath;
          $returnstring = $path . DIRECTORY_SEPARATOR . $this->get_files_target_url($component, $filearea, $itemid) . '/';
          $returnstring = clean_param($returnstring, PARAM_PATH);
  
          return str_replace('@@PLUGINFILE@@/', $returnstring, $text);
      }
code: public function rewrite_pluginfile_urls(array $subcontext, $component, $filearea, $itemid, $text) : string {
          // Need to take into consideration the subcontext to provide the full path to this file.
          $subcontextpath = '';
          if (!empty($subcontext)) {
              $subcontextpath = DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $subcontext);
          }
          $path = $this->get_context_path();
          $path = implode(DIRECTORY_SEPARATOR, $path) . $subcontextpath;
          $returnstring = $path . DIRECTORY_SEPARATOR . $this->get_files_target_url($component, $filearea, $itemid) . '/';
          $returnstring = clean_param($returnstring, PARAM_PATH);
  
          return str_replace('@@PLUGINFILE@@/', $returnstring, $text);
      }
code_tokens: public function rewrite_pluginfile_urls ( array $ subcontext , $ component , $ filearea , $ itemid , $ text ) : string { // Need to take into consideration the subcontext to provide the full path to this file. $ subcontextpath = '' ; if ( ! empty ( $ subcontext ) ) { $ subcontextpath = DIRECTORY_SEPARATOR . implode ( DIRECTORY_SEPARATOR , $ subcontext ) ; } $ path = $ this -> get_context_path ( ) ; $ path = implode ( DIRECTORY_SEPARATOR , $ path ) . $ subcontextpath ; $ returnstring = $ path . DIRECTORY_SEPARATOR . $ this -> get_files_target_url ( $ component , $ filearea , $ itemid ) . '/' ; $ returnstring = clean_param ( $ returnstring , PARAM_PATH ) ; return str_replace ( '@@PLUGINFILE@@/' , $ returnstring , $ text ) ; }
docstring: Prepare a text area by processing pluginfile URLs within it.
  
  @param   array           $subcontext The location within the current context that this data belongs.
  @param   string          $component  The name of the component that the files belong to.
  @param   string          $filearea   The filearea within that component.
  @param   string          $itemid     Which item those files belong to.
  @param   string          $text       The text to be processed
  @return  string                      The processed string
docstring_tokens: Prepare a text area by processing pluginfile URLs within it .