function hook_ctools_math_expression_constants_alter
Alter the available functions to be used in ctools math expression api.
One usecase would be to create your own function in your module and allow to use it in the math expression api.
Parameters
array $constants: An array of name:value pairs, one for each named constant. Values added to this array become read-only variables with the value assigned here.
1 invocation of hook_ctools_math_expression_constants_alter()
- ctools_math_expr::__construct in includes/
math-expr.inc - Public constructor.
File
-
./
ctools.api.php, line 188
Code
function hook_ctools_math_expression_constants_alter(array &$constants) {
// Add the speed of light as constant 'c':
$constants['c'] = 299792458;
}