You are here

commerce_coupon_handler_field_coupon_edit.inc in Commerce Coupon 7.2

Edit coupon link field handler.

File

includes/views/handlers/commerce_coupon_handler_field_coupon_edit.inc
View source
<?php

/**
 * @file
 * Edit coupon link field handler.
 */

/**
 * Edit coupon link field handler.
 */
class commerce_coupon_handler_field_coupon_edit extends commerce_coupon_handler_field_coupon_link {

  /**
   * Overrides parent::render($values).
   */
  function render($values) {
    $coupon_id = $this
      ->get_value($values, 'coupon_id');
    if (!$this
      ->check_access($coupon_id, 'update')) {
      return;
    }
    $text = !empty($this->options['text']) ? $this->options['text'] : t('Edit');
    return l($text, 'admin/commerce/coupons/' . $coupon_id . '/edit', array(
      'query' => drupal_get_destination(),
    ));
  }

}

Classes

Namesort descending Description
commerce_coupon_handler_field_coupon_edit Edit coupon link field handler.