function theme_uc_cart_block_title in Ubercart 7.3
Same name and namespace in other branches
- 5 uc_cart/uc_cart.module \theme_uc_cart_block_title()
- 6.2 uc_cart/uc_cart.module \theme_uc_cart_block_title()
Themes the shopping cart block title.
Parameters
$variables: An associative array containing:
- 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.
- collapsed: TRUE or FALSE indicating whether or not the cart block is collapsed.
Return value
string The HTML output.
1 theme call to theme_uc_cart_block_title()
- uc_cart_preprocess_block in uc_cart/
uc_cart.module - Preprocesses the cart block output to include the icon.
File
- uc_cart/
uc_cart.theme.inc, line 26 - Theme functions for the uc_cart module.
Code
function theme_uc_cart_block_title($variables) {
$title = $variables['title'];
$icon_class = $variables['icon_class'];
$collapsible = $variables['collapsible'];
$collapsed = $variables['collapsed'];
$output = '';
// Add in the cart image if specified.
if ($icon_class) {
$output .= theme('uc_cart_block_title_icon', array(
'icon_class' => $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;
if ($collapsed) {
$output .= '<span class="cart-block-arrow arrow-down"></span>';
}
else {
$output .= '<span class="cart-block-arrow"></span>';
}
$output .= '</span>';
}
else {
$output .= '<span class="cart-block-title-bar">' . $title . '</span>';
}
return $output;
}