mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 09:17:35 +00:00
49 lines
1.0 KiB
PHP
49 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* Locator for page layouts XSD schemas.
|
|
*
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\Theme\Model\Layout\Config;
|
|
|
|
use Magento\Framework\Config\Dom\UrnResolver;
|
|
|
|
class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
|
|
{
|
|
/**
|
|
* Path to corresponding XSD file with validation rules for merged config
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $_schema;
|
|
|
|
/**
|
|
* @param UrnResolver $urnResolver
|
|
*/
|
|
public function __construct(UrnResolver $urnResolver)
|
|
{
|
|
$this->_schema = $urnResolver->getRealPath('urn:magento:framework:View/PageLayout/etc/layouts.xsd');
|
|
}
|
|
|
|
/**
|
|
* Get path to merged config schema
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getSchema()
|
|
{
|
|
return $this->_schema;
|
|
}
|
|
|
|
/**
|
|
* Get path to per file validation schema
|
|
*
|
|
* @return string|null
|
|
*/
|
|
public function getPerFileSchema()
|
|
{
|
|
return $this->_schema;
|
|
}
|
|
}
|