function uc_recurring_fee_status_label in UC Recurring Payments and Subscriptions 6.2
Same name and namespace in other branches
- 7.2 uc_recurring.module \uc_recurring_fee_status_label()
Returns the human readable labels for defined statuses.
Parameters
$status: Optionally specify a status and return only its label.
Return value
An array of recurring fee status labels or a single label if specified.
6 calls to uc_recurring_fee_status_label()
- theme_uc_recurring_admin_table in ./
uc_recurring.module - Displays a table for users to administer their recurring fees.
- theme_uc_recurring_user_table in ./
uc_recurring.module - Displays a table for users to administer their recurring fees.
- uc_recurring_admin_edit_form in ./
uc_recurring.admin.inc - Let an admin edit a recurring fee.
- uc_recurring_status_views_handler_field::render in views/
uc_recurring_status_views_handler_field.inc - uc_recurring_status_views_handler_filter::get_value_options in views/
uc_recurring_status_views_handler_filter.inc
File
- ./
uc_recurring.module, line 1130 - Allows you to add a recurring fee to a product/SKU to handle subscription type services.
Code
function uc_recurring_fee_status_label($status = NULL) {
// Define the array for defined statuses.
$status_labels = array(
UC_RECURRING_FEE_STATUS_ACTIVE => t('Active'),
UC_RECURRING_FEE_STATUS_EXPIRED => t('Expired'),
UC_RECURRING_FEE_STATUS_CANCELLED => t('Cancelled'),
UC_RECURRING_FEE_STATUS_SUSPENDED => t('Suspended'),
);
drupal_alter('uc_recurring_status', $status_labels);
// Return the specific status if specified.
if (!is_null($status)) {
return isset($status_labels[$status]) ? $status_labels[$status] : FALSE;
}
return $status_labels;
}