function units_element_info in Units of Measurement 7.2
Implements hook_element_info().
File
- ./
units.module, line 137 - Provide API for managing and converting units of measurement.
Code
function units_element_info() {
return array(
'units_mathematical_expression' => array(
'#input' => TRUE,
'#process' => array(
'units_mathematical_expression_element_process',
),
'#element_validate' => array(
'units_mathematical_expression_element_validate',
),
// In what format to represent the submitted mathematical expression.
// Allowed values are:
// - object: to represent as an instance of
// UnitsMathematicalExpressionWrapper
// - infix: to represent as a string in infix notation
// - postfix: to represent as a string in postfix notation
'#value_format' => 'object',
// If the form element should accept only mathematical expressions of a
// specific dimension, put the allowed dimension here.
'#allowed_dimension' => NULL,
),
);
}