14 class View extends \Magento\Framework\Config\Reader\Filesystem
46 $domDocumentClass = \
Magento\Framework\Config\Dom::class,
47 $defaultScope =
'global',
75 return $this->data[
'vars'][$module] ?? [];
88 if (!isset($this->data[
'vars'][$module])) {
92 $value = $this->data[
'vars'][$module];
93 foreach (explode(
'/', $var) as $node) {
114 return $this->data[
'media'][$module][$mediaType] ?? [];
128 return $this->data[
'media'][$module][$mediaType][$mediaId] ?? [];
139 '/view/vars' =>
'module',
140 '/view/vars/(var/)*var' =>
'name',
141 '/view/exclude/item' => [
'type',
'item'],
146 if (count(
$id) > 1) {
147 $idAttributes[$key] = array_values(
$id);
149 $idAttributes[$key] = array_shift(
$id);
154 return $idAttributes;
165 return $items[
'file'] ?? [];
176 return $items[
'directory'] ?? [];
187 return $this->data[
'exclude'] ?? [];
197 if ($this->data ===
null) {
198 $this->data = $this->
read();
206 public function read($scope =
null)
211 $parents = (array)$this->_fileResolver->getParents($this->_fileName, $scope);
215 foreach ($parents as $parent) {
216 $result = array_replace_recursive(
$result, $this->_readFiles([$parent]));
219 return array_replace_recursive(
$result, parent::read($scope));
getMediaAttributes($module, $mediaType, $mediaId)
__construct(FileResolverInterface $fileResolver, ConverterInterface $converter, SchemaLocatorInterface $schemaLocator, ValidationStateInterface $validationState, $fileName, $idAttributes=[], $domDocumentClass=\Magento\Framework\Config\Dom::class, $defaultScope='global', $xpath=[])
getMediaEntities($module, $mediaType)
getVarValue($module, $var)