You are here

class field_timer_text_date in Field Timer 7.2

Class for field_timer_text formatter and date field type.

Hierarchy

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();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
field_timer_text_base::enableFormatter public function @inheritdoc Overrides field_timer_formatter_interface::enableFormatter
field_timer_text_base::formatInterval protected function Formats interval according to granularity settings.
field_timer_text_base::formatterGranularityAuto protected function
field_timer_text_base::formatterGranularityManual protected function
field_timer_text_base::formatterTypes protected function
field_timer_text_base::getFormatterDefinition final public function @inheritdoc Overrides field_timer_formatter_interface::getFormatterDefinition
field_timer_text_base::getFormatterName public function @inheritdoc Overrides field_timer_formatter_interface::getFormatterName
field_timer_text_base::granularitySettingsSummary protected function
field_timer_text_base::granularityTypes protected function
field_timer_text_base::renderItem protected function Render field item.
field_timer_text_date::getFieldType public function @inheritdoc Overrides field_timer_formatter_interface::getFieldType
field_timer_text_date::getTimestamp protected function @inheritdoc Overrides field_timer_formatter_base::getTimestamp
field_timer_text_date_field_base::formatterDisplays protected function
field_timer_text_date_field_base::getDefaultSettings public function @inheritdoc Overrides field_timer_text_base::getDefaultSettings
field_timer_text_date_field_base::getSettingsForm public function @inheritdoc Overrides field_timer_text_base::getSettingsForm
field_timer_text_date_field_base::getSettingsSummary public function @inheritdoc Overrides field_timer_text_base::getSettingsSummary
field_timer_text_date_field_base::renderItems public function @inheritdoc Overrides field_timer_text_base::renderItems