class service_links_handler_field_service_links in Service links 6.2
Same name and namespace in other branches
- 7.2 service_links_handler_field_service_links.inc \service_links_handler_field_service_links
@file A handler to provide a service links field for a particular node.
Hierarchy
- class \service_links_handler_field_service_links extends \views_handler_field
Expanded class hierarchy of service_links_handler_field_service_links
1 string reference to 'service_links_handler_field_service_links'
- service_links_views_data in ./
service_links.views.inc - Implementation of hook_views_data().
File
- ./
service_links_handler_field_service_links.inc, line 9 - A handler to provide a service links field for a particular node.
View source
class service_links_handler_field_service_links extends views_handler_field {
function construct() {
parent::construct();
$this->additional_fields['nid'] = 'nid';
$this->additional_fields['title'] = 'title';
}
function query() {
$this
->ensure_my_table();
$this
->add_additional_fields();
}
function option_definition() {
$options = parent::option_definition();
return $options;
}
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Remove the alteration stuff
unset($form['alter']);
}
function render($values) {
$node = new stdClass();
$node->nid = $values->{$this->aliases['nid']};
$node->title = $values->{$this->aliases['title']};
// Nothing to render.
return theme('links', service_links_render($node, TRUE));
}
}