SchemaLocator.php 968 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Config\Reader\Template;
  7. use Magento\Framework\Module\Dir;
  8. /**
  9. * Config schema locator interface
  10. */
  11. class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
  12. {
  13. /**
  14. * Path to corresponding XSD file with validation rules for merged config
  15. *
  16. * @var string
  17. */
  18. private $schema;
  19. /**
  20. * @param \Magento\Framework\Module\Dir\Reader $moduleReader
  21. */
  22. public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader)
  23. {
  24. $this->schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Ui') . '/' . 'ui_template.xsd';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function getSchema()
  30. {
  31. return $this->schema;
  32. }
  33. /**
  34. * {@inheritdoc}
  35. */
  36. public function getPerFileSchema()
  37. {
  38. return null;
  39. }
  40. }