You are here

public function views_aggregator_plugin_style_table::is_renderable in Views Aggregator Plus 7

Returns if the supplied field is renderable through its native function.

Parameters

string $field_name: Field name to check.

bool $is_column: TRUE, if we handle column aggregation.

Return value

bool TRUE, if the field is renderable through its native function.

2 calls to views_aggregator_plugin_style_table::is_renderable()
views_aggregator_plugin_style_table::set_cell in views/views_aggregator_plugin_style_table.inc
Render and set a raw value on the table cell in specified column and row.
views_aggregator_plugin_style_table::set_totals_row in views/views_aggregator_plugin_style_table.inc
Write the aggregated results back into the View results totals (footer).

File

views/views_aggregator_plugin_style_table.inc, line 963
views_aggregator_plugin_style_table.inc

Class

views_aggregator_plugin_style_table
Style plugin to render each item as a row in a table.

Code

public function is_renderable($field_name, $is_column = FALSE) {
  if (empty($this->options['info'][$field_name][$is_column ? 'has_aggr_column' : 'has_aggr'])) {
    return TRUE;
  }
  $aggr_functions = $this->options['info'][$field_name][$is_column ? 'aggr_column' : 'aggr'];
  $aggr_function = is_array($aggr_functions) ? end($aggr_functions) : $aggr_functions;
  $aggr_function_info = views_aggregator_get_aggregation_functions_info($aggr_function);

  // Aggregation functions are considered renderable unless set to FALSE.
  return !isset($aggr_function_info['is_renderable']) || !empty($aggr_function_info['is_renderable']);
}