You are here

function uc_discounts_codes_to_str in Ubercart Discounts (Alternative) 7.2

Same name and namespace in other branches
  1. 6.2 uc_discounts/uc_discounts.module \uc_discounts_codes_to_str()

Converts an array of codes to a newline separated code string.

Note: returns "" if passed array is null.

Parameters

array $codes:

Return value

string

3 calls to uc_discounts_codes_to_str()
uc_discounts_admin_discount_edit_form in uc_discounts/uc_discounts.admin.inc
Generates admin form to create or edit a discount.
uc_discounts_uc_checkout_pane_discounts in uc_discounts/uc_discounts.module
Discounts checkout pane callback.
uc_discounts_uc_order in uc_discounts/uc_discounts.module
Implements hook_uc_order().

File

uc_discounts/uc_discounts.module, line 2392

Code

function uc_discounts_codes_to_str($codes) {
  return implode("\n", (array) $codes);
}