SchemaLocator.php 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Email templates config schema locator
  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\Module\Dir;
  10. class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
  11. {
  12. /**
  13. * Path to corresponding XSD file with validation rules for both individual and merged configs
  14. *
  15. * @var string
  16. */
  17. private $_schema;
  18. /**
  19. * @param \Magento\Framework\Module\Dir\Reader $moduleReader
  20. */
  21. public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader)
  22. {
  23. $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Email') . '/email_templates.xsd';
  24. }
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public function getSchema()
  29. {
  30. return $this->_schema;
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function getPerFileSchema()
  36. {
  37. return $this->_schema;
  38. }
  39. }