You are here

public static function Settings::listPriceFormats in Basic cart 8.2

Same name and namespace in other branches
  1. 8.6 src/Settings.php \Drupal\basic_cart\Settings::listPriceFormats()
  2. 8 src/Settings.php \Drupal\basic_cart\Settings::listPriceFormats()
  3. 8.0 src/Settings.php \Drupal\basic_cart\Settings::listPriceFormats()
  4. 8.3 src/Settings.php \Drupal\basic_cart\Settings::listPriceFormats()
  5. 8.4 src/Settings.php \Drupal\basic_cart\Settings::listPriceFormats()
  6. 8.5 src/Settings.php \Drupal\basic_cart\Settings::listPriceFormats()

Returns the available price formats.

Return value

formats A list with the available price formats.

File

src/Settings.php, line 104

Class

Settings
Settings file for basic cart.

Namespace

Drupal\basic_cart

Code

public static function listPriceFormats() {
  $config = self::cartSettings();
  $currency = $config
    ->get('currency');
  return array(
    0 => t('1 234,00 @currency', array(
      '@currency' => $currency,
    )),
    1 => t('1 234.00 @currency', array(
      '@currency' => $currency,
    )),
    2 => t('1,234.00 @currency', array(
      '@currency' => $currency,
    )),
    3 => t('1.234,00 @currency', array(
      '@currency' => $currency,
    )),
    4 => t('@currency 1 234,00', array(
      '@currency' => $currency,
    )),
    5 => t('@currency 1 234.00', array(
      '@currency' => $currency,
    )),
    6 => t('@currency 1,234.00', array(
      '@currency' => $currency,
    )),
    7 => t('@currency 1.234,00', array(
      '@currency' => $currency,
    )),
  );
}