public function views_aggregator_plugin_style_table::get_cell in Views Aggregator Plus 7
Returns the raw or rendered result at the intersection of column and row.
Parameters
object $field_handler: The handler associated with the result column being requested.
int $row_num: The result row number.
bool $render: Whether the rendered or raw value should be returned.
Return value
string Returns empty string if there are no results for the requested row_num.
1 call to views_aggregator_plugin_style_table::get_cell()
- views_aggregator_plugin_style_table::compare_result_rows in views/
views_aggregator_plugin_style_table.inc - Compare function for aggregated groups, for use in sorting functions.
File
Class
- views_aggregator_plugin_style_table
- Style plugin to render each item as a row in a table.
Code
public function get_cell($field_handler, $row_num, $render) {
$field_name = $field_handler->options['id'];
if (isset($this->rendered_fields[$row_num][$field_name])) {
// Bit of a hack for "Webform submission data: Value(...)" and
// "Global: Math expression" fields... Always pick up the rendered fields,
// as it seems that's all we can get!
if ($render || is_a($field_handler, 'webform_handler_field_submission_data') || is_a($field_handler, 'views_php_handler_field')) {
return $this->rendered_fields[$row_num][$field_name];
}
if (is_a($field_handler, 'views_handler_field_math')) {
// Ignore non-numeric leading characters like currency signs.
return vap_num($this->rendered_fields[$row_num][$field_name]);
}
}
if (!isset($field_handler->view->result[$row_num])) {
return '';
}
$field_handler->view->row_index = $row_num;
return $this
->get_cell_raw($field_handler, $field_handler->view->result[$row_num], TRUE);
}