protected static function prepare_breadcrumb($breadcrumb) {
        global $OUTPUT;
        $foldericon = $OUTPUT->image_url(file_folder_icon(24))->out(false);
        $len = count($breadcrumb);
        for ($i = 0; $i < $len; $i++) {
            if (is_array($breadcrumb[$i]) && !isset($breadcrumb[$i]['icon'])) {
                $breadcrumb[$i]['icon'] = $foldericon;
            } else if (is_object($breadcrumb[$i]) && !isset($breadcrumb[$i]->icon)) {
                $breadcrumb[$i]->icon = $foldericon;
            }
        }
        return $breadcrumb;
    }