You are here

interface CurrencyHelperInterface in Commerce Currency Resolver 8

Interface CurrencyHelperInterface.

@package Drupal\commerce_currency_resolver

Hierarchy

Expanded class hierarchy of CurrencyHelperInterface

All classes that implement CurrencyHelperInterface

3 files declare their use of CurrencyHelperInterface
CommerceCurrencyResolverForm.php in src/Form/CommerceCurrencyResolverForm.php
CommerceCurrencyResolverMapping.php in src/Form/CommerceCurrencyResolverMapping.php
CommerceCurrencyResolverSelectForm.php in src/Form/CommerceCurrencyResolverSelectForm.php

File

src/CurrencyHelperInterface.php, line 10

Namespace

Drupal\commerce_currency_resolver
View source
interface CurrencyHelperInterface {

  /**
   * Return formatted array of available exchange rates plugins.
   *
   * @return array
   *   List of keyed providers ['provider_id' => 'Provider name'].
   */
  public function getExchangeRatesProviders();

  /**
   * Return formatted array of available currencies.
   *
   * @return array
   *   List of keyed currencies ['HRK' => 'Croatian Kuna'].
   */
  public function getCurrencies();

  /**
   * Return formatted array of languages.
   *
   * @return array
   *   List of keyed languages ['HR' => 'Croatian'].
   */
  public function getLanguages();

  /**
   * Return current user language.
   *
   * @return string
   *   Two letter language code.
   */
  public function currentLanguage();

  /**
   * Get list of enabled geo modules if any.
   *
   * @return array
   *   List of geo modules.
   */
  public function getGeoModules();

  /**
   * Get user country location from contrib modules.
   *
   * @return mixed
   *   Return 2 letter country code.
   */
  public function getUserCountry();

  /**
   * Get how currency is mapped in the system. By country, language, cookie.
   *
   * @return string
   *   Return mapping type.
   *
   * @see commerce_currency_resolver.settings
   */
  public function getSourceType();

  /**
   * Get how currency is mapped in the system. By country, language, cookie.
   *
   * @return array
   *   Return mapping type.
   *
   * @see commerce_currency_resolver.settings
   */
  public function getMappingMatrix();

  /**
   * Return if domicile currency is used.
   *
   * @return mixed
   *   Return if is active.
   */
  public function getDomicileCurrency();

  /**
   * Get default currency from current resolved store.
   *
   * @return string
   *   Return currency code.
   */
  public function defaultCurrencyCode();

  /**
   * Return default fallback currency from settings.
   *
   * @return string
   *   Return currency code.
   */
  public function fallbackCurrencyCode();

  /**
   * Get cookie name.
   *
   * @return string
   *   Return cookie name.
   */
  public function getCookieName();

}

Members

Namesort descending Modifiers Type Description Overrides
CurrencyHelperInterface::currentLanguage public function Return current user language. 1
CurrencyHelperInterface::defaultCurrencyCode public function Get default currency from current resolved store. 1
CurrencyHelperInterface::fallbackCurrencyCode public function Return default fallback currency from settings. 1
CurrencyHelperInterface::getCookieName public function Get cookie name. 1
CurrencyHelperInterface::getCurrencies public function Return formatted array of available currencies. 1
CurrencyHelperInterface::getDomicileCurrency public function Return if domicile currency is used. 1
CurrencyHelperInterface::getExchangeRatesProviders public function Return formatted array of available exchange rates plugins. 1
CurrencyHelperInterface::getGeoModules public function Get list of enabled geo modules if any. 1
CurrencyHelperInterface::getLanguages public function Return formatted array of languages. 1
CurrencyHelperInterface::getMappingMatrix public function Get how currency is mapped in the system. By country, language, cookie. 1
CurrencyHelperInterface::getSourceType public function Get how currency is mapped in the system. By country, language, cookie. 1
CurrencyHelperInterface::getUserCountry public function Get user country location from contrib modules. 1