You are here

function theme_uc_quote_returned_rates in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 shipping/uc_quote/uc_quote.theme.inc \theme_uc_quote_returned_rates()

Displays the returned shipping rates.

Parameters

array $variables: An associative array containing:

  • form: A render element representing the form.

Return value

string Formatted HTML.

1 string reference to 'theme_uc_quote_returned_rates'
uc_quote_theme in shipping/uc_quote/uc_quote.module
Implements hook_theme().

File

shipping/uc_quote/uc_quote.theme.inc, line 43
Theme functions for the uc_quote module.

Code

function theme_uc_quote_returned_rates(array $variables) {
  $form = $variables['form'];
  $output = '';
  $keys = Element::children($form);

  // Render notes and error messages after each radio button.
  if (count($keys) > 1) {
    foreach ($keys as $key) {
      if ($key == 'quote_option') {
        continue;
      }
      if (isset($form['quote_option'][$key])) {
        $output .= drupal_render($form['quote_option'][$key]);
      }
      $output .= drupal_render($form[$key]);
    }
  }
  $output .= drupal_render_children($form);
  return $output;
}