original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Prepare the breadcrumb.
  
  @param array $breadcrumb contains each element of the breadcrumb.
  @return array of breadcrumb elements.
  @since Moodle 2.3.3
docstring_tokens: Prepare the breadcrumb .