You are here

function nodeorder_handler_order_link::render in Node Order 7

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field_term_link_edit::render

File

includes/views/handlers/nodeorder_handler_order_link.inc, line 12
Definition of nodeorder_handler_order_link.

Class

nodeorder_handler_order_link
@file Definition of nodeorder_handler_order_link.

Code

function render($values) {

  // Check there is an actual value, as on a relationship there may not be.
  if ($tid = $this
    ->get_value($values, 'tid')) {
    if (nodeorder_order_access($tid)) {
      $text = !empty($this->options['text']) ? $this->options['text'] : t('order');
      return l($text, 'taxonomy/term/' . $tid . '/order', array(
        'query' => drupal_get_destination(),
      ));
    }
  }
}