protected function get_files_target_url($component, $filearea, $itemid) : string {
        // We do not need to include the component because we organise things by context.
        $parts = ['_files', $filearea];

        if (!empty($itemid)) {
            $parts[] = '_' . $itemid;
        }

        return implode('/', $parts);
    }
protected function get_files_target_url($component, $filearea, $itemid) : string {
        // We do not need to include the component because we organise things by context.
        $parts = ['_files', $filearea];

        if (!empty($itemid)) {
            $parts[] = '_' . $itemid;
        }

        return implode('/', $parts);
    }
protected function get_files_target_url ( $ component , $ filearea , $ itemid ) : string { // We do not need to include the component because we organise things by context. $ parts = [ '_files' , $ filearea ] ; if ( ! empty ( $ itemid ) ) { $ parts [ ] = '_' . $ itemid ; } return implode ( '/' , $ parts ) ; }
Get a relative url to the directory of the exported files within a subcontext.

@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.
@return string The url
Get a relative url to the directory of the exported files within a subcontext .