function quantity_measure_options in farmOS 2.x
Define available options for the Measure field.
File
- modules/
core/ quantity/ quantity.module, line 70 - Quantity module.
Code
function quantity_measure_options() {
// Start an empty options array.
$options = [];
// Load information about measures.
$measures = quantity_measures();
// Iterate through the measures and build a list of options.
foreach ($measures as $measure => $data) {
$options[$measure] = $data['label'];
}
// Return the array of options.
return $options;
}