You are here

public function PriceDifferenceFormatter::getDisplayOptions in Price Difference Formatter 8

Gets the options for the fields display elements.

Return value

array An array of options.

2 calls to PriceDifferenceFormatter::getDisplayOptions()
PriceDifferenceFormatter::settingsForm in src/Plugin/Field/FieldFormatter/PriceDifferenceFormatter.php
Returns a form to configure settings for the formatter.
PriceDifferenceFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/PriceDifferenceFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/PriceDifferenceFormatter.php, line 127

Class

PriceDifferenceFormatter
Plugin implementation of the 'price_difference_formatter' formatter.

Namespace

Drupal\price_difference_formatter\Plugin\Field\FieldFormatter

Code

public function getDisplayOptions() {
  return [
    'discount_percentage' => $this
      ->t('The discount percentage amount'),
    'discount_currency' => $this
      ->t('The discount currency amount'),
  ];
}