| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: webform_handler_field_node_link_edit.inc,v 1.1.2.2 2010/09/11 02:18:53 quicksketch Exp $ 3 /** 4 * Field handler to present a link node edit. 5 */ 6 class webform_handler_field_node_link_edit extends views_handler_field_node_link { 7 function construct() { 8 parent::construct(); 9 $this->additional_fields['uid'] = 'uid'; 10 $this->additional_fields['type'] = 'type'; 11 $this->additional_fields['format'] = array('table' => 'node_revisions', 'field' => 'format'); 12 } 13 14 function render($values) { 15 // ensure user has access to edit this node. 16 $node = new stdClass(); 17 $node->nid = $values->{$this->aliases['nid']}; 18 $node->uid = $values->{$this->aliases['uid']}; 19 $node->type = $values->{$this->aliases['type']}; 20 $node->format = $values->{$this->aliases['format']}; 21 $node->status = 1; // unpublished nodes ignore access control 22 if (!node_access('update', $node)) { 23 return; 24 } 25 26 $text = !empty($this->options['text']) ? $this->options['text'] : t('edit webform'); 27 return l($text, "node/$node->nid/webform"); 28 } 29 } 30
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |