function _commerce_file_limit_duration_element_units in Commerce File 7
Defines possible duration multipliers.
2 calls to _commerce_file_limit_duration_element_units()
- commerce_file_limit_duration_element_process in includes/
commerce_file.elements.inc - FAPI process callback for limit textfield element type.
- _commerce_file_limit_duration_element_greatest_unit in includes/
commerce_file.elements.inc - Returns the greatest unit multiplier that yields an integer value
File
- includes/
commerce_file.elements.inc, line 306 - Commerce File form elements
Code
function _commerce_file_limit_duration_element_units() {
$units =& drupal_static(__FUNCTION__);
if (!isset($units)) {
$units = array(
365 * 86400 => t('years'),
30 * 86400 => t('months'),
7 * 86400 => t('weeks'),
86400 => t('days'),
3600 => t('hours'),
60 => t('minutes'),
1 => t('seconds'),
);
}
return $units;
}