You are here

function theme_uc_coupon_actions in Ubercart Discount Coupons 7.2

Same name and namespace in other branches
  1. 6 uc_coupon.admin.inc \theme_uc_coupon_actions()
  2. 7.3 uc_coupon.admin.inc \theme_uc_coupon_actions()

Show the actions a user may perform on a coupon.

2 theme calls to theme_uc_coupon_actions()
uc_coupon_display in ./uc_coupon.admin.inc
Display a brief overview of system coupons
uc_coupon_handler_field_actions::render in views/uc_coupon_handler_field_actions.inc
Render the field.

File

./uc_coupon.admin.inc, line 1154
Discount Coupons administration pages.

Code

function theme_uc_coupon_actions($variables) {
  $coupon = $variables['coupon'];
  $actions = array();
  foreach (module_invoke_all('uc_coupon_actions', $coupon) as $action) {
    $icon = theme('image', array(
      'path' => $action['icon'],
      'alt' => $action['title'],
    ));
    $actions[] = l($icon, $action['url'], array(
      'attributes' => array(
        'title' => $action['title'],
      ),
      'html' => TRUE,
    ));
  }
  return implode(' ', $actions);
}