You are here

class _taxonomy_CrumbsMultiPlugin_termReference_commerce_product in Crumbs, the Breadcrumbs suite 7

Hierarchy

Expanded class hierarchy of _taxonomy_CrumbsMultiPlugin_termReference_commerce_product

File

plugins/crumbs.taxonomy.inc, line 139

View source
class _taxonomy_CrumbsMultiPlugin_termReference_commerce_product extends _taxonomy_CrumbsMultiPlugin_termReference {
  protected $entityType = 'commerce_product';

  /**
   * Match "product/%" router path.
   * This works only in combination with commerce_product_page module.
   */
  function findParent__product_x($path, $item) {
    $product = $item['map'][1];

    // Load the product if it hasn't been loaded due to a missing wildcard loader.
    $product = is_numeric($product) ? commerce_product_load($product) : $product;
    $parent_path = $this
      ->_findParentPath($product);
    if ($parent_path) {

      // TODO: Is 'user' the correct bundle name?
      return array(
        $product->type => $parent_path,
      );
    }
  }

}

Members