You are here

function commerce_coupon_ui_set_breadcrumb in Commerce Coupon 7

Sets the breadcrumb for administrative coupon pages.

Parameters

$coupon_types: TRUE or FALSE indicating whether or not the breadcrumb should include the coupon types administrative page.

3 calls to commerce_coupon_ui_set_breadcrumb()
commerce_coupon_ui_coupon_delete_form_wrapper in ./commerce_coupon_ui.module
Form callback wrapper: confirmation form for deleting a coupon.
commerce_coupon_ui_coupon_form_wrapper in ./commerce_coupon_ui.module
Form callback wrapper: create or edit a coupon.
commerce_coupon_ui_coupon_type_delete_form_wrapper in ./commerce_coupon_ui.module
Form callback wrapper: confirmation form for deleting a coupon type.

File

./commerce_coupon_ui.module, line 329
Coupon User Interface for Drupal Commerce

Code

function commerce_coupon_ui_set_breadcrumb($coupon_types = FALSE) {
  $breadcrumb = array(
    l(t('Home'), '<front>'),
    l(t('Administration'), 'admin'),
    l(t('Store'), 'admin/commerce'),
    l(t('Coupons'), 'admin/commerce/coupons'),
  );
  if ($coupon_types) {
    $breadcrumb[] = l(t('Coupon types'), 'admin/commerce/coupons/types');
  }
  drupal_set_breadcrumb($breadcrumb);
}