public function UcAddressesDateFieldHandler::outputValue in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 handlers/uc_addresses.handlers.inc \UcAddressesDateFieldHandler::outputValue()
Overrides UcAddressesFieldHandler::outputValue().
If a format is specified, the value will be formatted using that (date) format. If no format is specified, the value will be formatted using the site default date format.
Overrides UcAddressesFieldHandler::outputValue
File
- handlers/
uc_addresses.handlers.inc, line 291 - Field handlers for Ubercart Addresses address fields:
Class
- UcAddressesDateFieldHandler
- Class for the created/modified field.
Code
public function outputValue($value = '', $format = '') {
static $values = array();
if ($value === '') {
$value = $this
->getAddress()
->getField($this
->getFieldName());
}
if (isset($values[$value][$format])) {
return $values[$value][$format];
}
$values[$value] = token_get_date_token_values($value, $this
->getFieldName() . '-');
if (isset($values[$value][$format])) {
return $values[$value][$format];
}
}