You are here

function theme_uc_cart_block_title in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \theme_uc_cart_block_title()
  2. 7.3 uc_cart/uc_cart.theme.inc \theme_uc_cart_block_title()

Themes the shopping cart block title

Parameters

$title: The text to use for the title of the block.

$icon_class: Class to use for the cart icon image or FALSE if the icon is disabled.

$collapsible: TRUE or FALSE indicating whether or not the cart block is collapsible.

1 theme call to theme_uc_cart_block_title()
uc_cart_preprocess_block in uc_cart/uc_cart.module
Preprocesses the cart block output.

File

uc_cart/uc_cart.module, line 579

Code

function theme_uc_cart_block_title($title, $icon_class = 'cart-empty', $collapsible = TRUE) {
  $output = '';

  // Add in the cart image if specified.
  if ($icon_class) {
    $output .= theme('uc_cart_block_title_icon', $icon_class);
  }

  // Add the main title span and text, with or without the arrow based on the
  // cart block collapsibility settings.
  if ($collapsible) {
    $output .= '<span class="cart-block-title-bar" title="' . t('Show/hide shopping cart contents.') . '">' . $title . '<span class="cart-block-arrow"></span></span>';
  }
  else {
    $output .= '<span class="cart-block-title-bar">' . $title . '</span>';
  }
  return $output;
}