final public function get_meta() {
        global $CFG, $OUTPUT;
        $meta = new stdClass();
        $meta->id   = $this->id;
        $meta->name = format_string($this->get_name());
        $meta->type = $this->get_typename();
        $meta->icon = $OUTPUT->image_url('icon', 'repository_'.$meta->type)->out(false);
        $meta->supported_types = file_get_typegroup('extension', $this->supported_filetypes());
        $meta->return_types = $this->supported_returntypes();
        $meta->defaultreturntype = $this->default_returntype();
        $meta->sortorder = $this->options['sortorder'];
        return $meta;
    }