You are here

class editablefields_handler_field_node in Editable Fields 6.3

Field handler to provide simple renderer that allows linking to a node.

Hierarchy

Expanded class hierarchy of editablefields_handler_field_node

1 string reference to 'editablefields_handler_field_node'
editablefields_views_data_alter in includes/views/editablefields.views.inc
Implementation of hook_views_data_alter().

File

includes/views/editablefields_handler_field_node.inc, line 11
Contains the basic 'node' field handler.

View source
class editablefields_handler_field_node extends views_handler_field_node {

  /**
   * Provide link to node option
   */
  function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    editablefields_views_option_form($form, $form_state, 'node');
  }

  /**
   * Render whatever the data is as a link to the node.
   *
   * Data should be made XSS safe prior to calling this function.
   */
  function render_link($data, $values) {
    if (!empty($this->options['link_to_node'])) {
      $data = parent::render_link();
    }
    elseif (!empty($this->options['editable_allowed'])) {
      $data = 'editable link';
    }
    return $data;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
editablefields_handler_field_node::options_form function Provide link to node option
editablefields_handler_field_node::render_link function Render whatever the data is as a link to the node.