original_string: protected function buildCategoryBreadcrumbsProduct($category_id, array &$breadcrumbs)
      {
          if (!empty($this->data_categories[$category_id]['parents'])) {
  
              $category = $this->data_categories[$category_id];
              $parent = reset($category['parents']);
              $url = empty($category['alias']) ? "category/$category_id" : $category['alias'];
  
              $breadcrumb = array(
                  'url' => $this->url($url),
                  'text' => $category['title']
              );
  
              array_unshift($breadcrumbs, $breadcrumb);
              $this->buildCategoryBreadcrumbsProduct($parent, $breadcrumbs);
          }
      }
code: protected function buildCategoryBreadcrumbsProduct($category_id, array &$breadcrumbs)
      {
          if (!empty($this->data_categories[$category_id]['parents'])) {
  
              $category = $this->data_categories[$category_id];
              $parent = reset($category['parents']);
              $url = empty($category['alias']) ? "category/$category_id" : $category['alias'];
  
              $breadcrumb = array(
                  'url' => $this->url($url),
                  'text' => $category['title']
              );
  
              array_unshift($breadcrumbs, $breadcrumb);
              $this->buildCategoryBreadcrumbsProduct($parent, $breadcrumbs);
          }
      }
code_tokens: protected function buildCategoryBreadcrumbsProduct ( $ category_id , array & $ breadcrumbs ) { if ( ! empty ( $ this -> data_categories [ $ category_id ] [ 'parents' ] ) ) { $ category = $ this -> data_categories [ $ category_id ] ; $ parent = reset ( $ category [ 'parents' ] ) ; $ url = empty ( $ category [ 'alias' ] ) ? "category/$category_id" : $ category [ 'alias' ] ; $ breadcrumb = array ( 'url' => $ this -> url ( $ url ) , 'text' => $ category [ 'title' ] ) ; array_unshift ( $ breadcrumbs , $ breadcrumb ) ; $ this -> buildCategoryBreadcrumbsProduct ( $ parent , $ breadcrumbs ) ; } }
docstring: Builds an array of breadcrumbs containing all parent categories
  @param integer $category_id
  @param array $breadcrumbs
docstring_tokens: Builds an array of breadcrumbs containing all parent categories