Reader.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Loads email template configuration from multiple XML files by merging them together
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Email\Model\Template\Config;
  9. use Magento\Framework\Config\FileResolverInterface;
  10. use Magento\Framework\Config\ValidationStateInterface;
  11. class Reader extends \Magento\Framework\Config\Reader\Filesystem
  12. {
  13. /**
  14. * List of id attributes for merge
  15. *
  16. * @var array
  17. */
  18. protected $_idAttributes = ['/config/template' => 'id'];
  19. /**
  20. * @param FileResolverInterface $fileResolver
  21. * @param Converter $converter
  22. * @param SchemaLocator $schemaLocator
  23. * @param ValidationStateInterface $validationState
  24. * @param string $fileName
  25. * @param array $idAttributes
  26. * @param string $domDocumentClass
  27. * @param string $defaultScope
  28. */
  29. public function __construct(
  30. FileResolverInterface $fileResolver,
  31. Converter $converter,
  32. SchemaLocator $schemaLocator,
  33. ValidationStateInterface $validationState,
  34. $fileName = 'email_templates.xml',
  35. $idAttributes = [],
  36. $domDocumentClass = \Magento\Framework\Config\Dom::class,
  37. $defaultScope = 'global'
  38. ) {
  39. parent::__construct(
  40. $fileResolver,
  41. $converter,
  42. $schemaLocator,
  43. $validationState,
  44. $fileName,
  45. $idAttributes,
  46. $domDocumentClass,
  47. $defaultScope
  48. );
  49. }
  50. }