function theme_commerce_sagepay_card_logos in Drupal Commerce SagePay Integration 7
Theme function determining how card logos are displayed.
This is invoked by a form alter and adds the card logos as a Suffix to the card type dropdown.
Parameters
array $enabled_cards: An array of currently enabled cards.
Return value
string A themed output of card logos.
1 theme call to theme_commerce_sagepay_card_logos()
- commerce_sagepay_form_alter in ./
commerce_sagepay.module - Implements hook_form_alter().
File
- ./
commerce_sagepay.module, line 704
Code
function theme_commerce_sagepay_card_logos($variables) {
if (!isset($variables['enabled_cards'])) {
return '<div />';
}
$output = '<div class="card_type_images">';
foreach ($variables['enabled_cards'] as $card => $name) {
if ($name != '0') {
$output .= theme('commerce_sagepay_card_logo', array(
'card' => $card,
));
$output .= ' ';
}
}
$output .= '</div>';
return $output;
}