You are here

price.services.yml in Price 3.0.x

File

price.services.yml
View source
  1. services:
  2. price.currency_repository:
  3. class: Drupal\price\Repository\CurrencyRepository
  4. arguments: ['@entity_type.manager']
  5. price.number_format_repository:
  6. class: Drupal\price\Repository\NumberFormatRepository
  7. arguments: ['@event_dispatcher']
  8. price.currency_formatter:
  9. class: Drupal\price\CurrencyFormatter
  10. arguments: ['@price.number_format_repository', '@price.currency_repository', '@price.current_locale']
  11. price.number_formatter:
  12. class: Drupal\price\NumberFormatter
  13. arguments: ['@price.number_format_repository', '@price.current_locale']
  14. price.currency_importer:
  15. class: Drupal\price\CurrencyImporter
  16. arguments: ['@entity_type.manager', '@language_manager']
  17. price.number_formatter_factory:
  18. class: Drupal\price\NumberFormatterFactory
  19. arguments: ['@price.currency_formatter']
  20. deprecated: The "%service_id%" service is deprecated. You should use the 'price.currency_formatter' service instead. See http://drupal.org/node/the-change-notice-nid
  21. price.twig_extension:
  22. class: Drupal\price\TwigExtension\PriceTwigExtension
  23. tags:
  24. - { name: twig.extension }
  25. price.rounder:
  26. class: Drupal\price\Rounder
  27. arguments: ['@entity_type.manager']
  28. price.current_country:
  29. class: Drupal\price\CurrentCountry
  30. arguments: ['@request_stack', '@price.chain_country_resolver']
  31. price.chain_country_resolver:
  32. class: Drupal\price\Resolver\ChainCountryResolver
  33. tags:
  34. - { name: service_collector, call: addResolver, tag: price.country_resolver }
  35. price.default_country_resolver:
  36. class: Drupal\price\Resolver\DefaultCountryResolver
  37. arguments: ['@config.factory']
  38. tags:
  39. - { name: price.country_resolver, priority: -100 }
  40. cache_context.price_country:
  41. class: Drupal\price\Cache\Context\CountryCacheContext
  42. arguments: ['@price.current_country']
  43. tags:
  44. - { name: cache.context}
  45. price.current_locale:
  46. class: Drupal\price\CurrentLocale
  47. arguments: ['@request_stack', '@price.chain_locale_resolver']
  48. price.chain_locale_resolver:
  49. class: Drupal\price\Resolver\ChainLocaleResolver
  50. tags:
  51. - { name: service_collector, call: addResolver, tag: price.locale_resolver }
  52. price.default_locale_resolver:
  53. class: Drupal\price\Resolver\DefaultLocaleResolver
  54. arguments: ['@language_manager', '@price.current_country']
  55. tags:
  56. - { name: price.locale_resolver, priority: -100 }