Config.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Translate\Js;
  7. /**
  8. * Js Translation config
  9. */
  10. class Config
  11. {
  12. /**
  13. * Should the framework generate dictionary file
  14. *
  15. * @var bool
  16. */
  17. protected $dictionaryEnabled;
  18. /**
  19. * Name of dictionary json file
  20. *
  21. * @var string
  22. */
  23. protected $dictionaryFileName;
  24. /**
  25. * @param bool $dictionaryEnabled
  26. * @param string $dictionaryFileName
  27. */
  28. public function __construct($dictionaryEnabled = false, $dictionaryFileName = null)
  29. {
  30. $this->dictionaryEnabled = $dictionaryEnabled;
  31. $this->dictionaryFileName = $dictionaryFileName;
  32. }
  33. /**
  34. * Should the framework generate dictionary file
  35. *
  36. * @return bool
  37. */
  38. public function dictionaryEnabled()
  39. {
  40. return $this->dictionaryEnabled;
  41. }
  42. /**
  43. * Name of dictionary json file
  44. *
  45. * @return string
  46. */
  47. public function getDictionaryFileName()
  48. {
  49. return $this->dictionaryFileName;
  50. }
  51. }