additional_fields['uid'] = 'uid'; } protected function defineOptions() { $options = parent::defineOptions(); $options['text'] = array('default' => '', 'translatable' => TRUE); return $options; } public function buildOptionsForm(&$form, &$form_state) { $form['text'] = array( '#type' => 'textfield', '#title' => t('Text to display'), '#default_value' => $this->options['text'], ); parent::buildOptionsForm($form, $form_state); } // An example of field level access control. public function access() { return user_access('access user profiles'); } public function query() { $this->ensureMyTable(); $this->add_additional_fields(); } function render($values) { $value = $this->get_value($values, 'uid'); return $this->render_link($this->sanitizeValue($value), $values); } function render_link($data, $values) { $text = !empty($this->options['text']) ? $this->options['text'] : t('view'); $this->options['alter']['make_link'] = TRUE; $this->options['alter']['path'] = "user/" . $data; return $text; } }