You are here

function commerce_multicurrency_block_view in Commerce Multicurrency 7

Implements hook_block_view().

File

./commerce_multicurrency.module, line 360
Enhancements for the commerce currency support.

Code

function commerce_multicurrency_block_view($delta) {
  $block = array();
  switch ($delta) {
    case 'currency_selector':
      $block['subject'] = t('Select currency');
      $block['content'] = drupal_get_form('commerce_multicurrency_selector_form');
      break;
    case 'currency_menu':
      $block['subject'] = t('Select currency');
      $block['content'] = theme('commerce_multicurrency_selector_menu', array(
        'user_currency' => commerce_multicurrency_get_user_currency_code(),
        'enabled_currencies' => commerce_currencies(TRUE),
      ));
      break;
  }
  return $block;
}