You are here

protected static function Base::getDateFormatter in Double Field 8.3

Same name and namespace in other branches
  1. 4.x 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 373

Class

Base
Base class for Double field formatters.

Namespace

Drupal\double_field\Plugin\Field\FieldFormatter

Code

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