You are here

linkit_picker_handler_field_node_info.inc in Linkit Picker 7.2

Provides a handler that builds the string for node links.

File

includes/linkit_picker_handler_field_node_info.inc
View source
<?php

/**
 * @file
 * Provides a handler that builds the string for node links.
 */
class linkit_picker_handler_field_node_info extends views_handler_field {

  /**
   * Override but do nothing.
   * @see views_handler_field::query()
   */
  public function query() {

    // Do nothing, as this handler does not need
    // to do anything to the query itself.
  }

  /**
   * Return linkit picker metadata.
   * @see views_handler_field::render()
   */
  public function render($values) {
    $value = array(
      'path' => '/node/' . $values->nid,
      'title' => $values->node_title,
    );
    return drupal_json_encode($value);
  }

}

Classes

Namesort descending Description
linkit_picker_handler_field_node_info @file Provides a handler that builds the string for node links.