You are here

protected static function Base::getDateFormatter in Double Field 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/Field/FieldFormatter/Base.php \Drupal\double_field\Plugin\Field\FieldFormatter\Base::getDateFormatter()

Returns date formatter.

2 calls to Base::getDateFormatter()
Base::prepareItems in src/Plugin/Field/FieldFormatter/Base.php
Prepare field items.
Base::settingsForm in src/Plugin/Field/FieldFormatter/Base.php
Returns a form to configure settings for the formatter.

File

src/Plugin/Field/FieldFormatter/Base.php, line 355

Class

Base
Base class for Double field formatters.

Namespace

Drupal\double_field\Plugin\Field\FieldFormatter

Code

protected static function getDateFormatter() : DateFormatterInterface {
  return \Drupal::service('date.formatter');
}