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);
    }