function _views_calc_operators in Views Calc 5
Same name and namespace in other branches
- 6.3 views_calc.module \_views_calc_operators()
- 6 views_calc.module \_views_calc_operators()
- 7 views_calc.module \_views_calc_operators()
Default SQL operator alternatives.
The ones allowed in this system are stored in the variable views_calc_operators, and can be changed at admin/settings/views_calc.
3 calls to _views_calc_operators()
- views_calc_field_form_item in ./
views_calc.module - A form element for an individual calculated field.
- views_calc_settings_form in ./
views_calc.module - Implementation of hook_settings()
- _views_calc_replacements in ./
views_calc.module - An array of allowable calculation values.
File
- ./
views_calc.module, line 34 - This module will allow you to add calculated fields to views tables and compute (SUM, COUNT, AVG, etc) columns of numeric data in a views table.
Code
function _views_calc_operators() {
$default = array(
'+',
'-',
'*',
'/',
'(',
')',
',',
"'",
'CONCAT',
'MIN',
'MAX',
'ROUND',
'NOW()',
);
$operators = variable_get('views_calc_operators', implode("\n", $default));
return explode("\n", $operators);
}