function pay_handler_field_pay_form::render in Pay 7
Same name and namespace in other branches
- 6 includes/views/pay_handler_field_pay_form.inc \pay_handler_field_pay_form::render()
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- includes/
views/ pay_handler_field_pay_form.inc, line 26 - A Views field handler that lists payment forms.
Class
- pay_handler_field_pay_form
- @file A Views field handler that lists payment forms.
Code
function render(&$values) {
$key = $this->definition['pay_key'];
if ($this->table != $this->query->base_table) {
$key = $this->field_alias ? $this->field_alias : $this->table . '_' . $key;
}
if ($pay = pay_load_object($this->definition['pay_type'], $values->{$key})) {
/* TODO this is an inappropriate hack that presumes that a missing
menu_path() should be node/XX/pay on node-based views. This case is
only true on pay_node forms. This should move to that module somehow.
*/
if (!$pay
->menu_path() && ($nid = $values->nid)) {
$pay
->set_menu_path('node/' . $nid . '/pay');
}
// TODO Please change this theme call to use an associative array for the $variables parameter.
return theme($this->options['display'], $pay);
}
}