class field_timer_text_date in Field Timer 7.2
Class for field_timer_text formatter and date field type.
Hierarchy
- class \field_timer_formatter_base implements field_timer_formatter_interface
- class \field_timer_text_base
- class \field_timer_text_date_field_base
- class \field_timer_text_date
- class \field_timer_text_date_field_base
- class \field_timer_text_base
Expanded class hierarchy of field_timer_text_date
File
- includes/
field_timer_text.inc, line 455 - Contains help classes to perform field_timer_text formatter related actions.
View source
class field_timer_text_date extends field_timer_text_date_field_base {
/**
* @inheritdoc
*/
public function getFieldType() {
return 'date';
}
/**
* @inheritdoc
*/
protected function getTimestamp($item, $field, $key = 'value') {
$timezone_db = date_get_timezone_db($field['settings']['tz_handling']);
$db_format = date_type_format($field['type']);
$date = new DateObject($item[$key], $timezone_db, $db_format);
return $date
->getTimestamp();
}
}