63 $ownerDocument = $node->ownerDocument;
64 $parentNode = $node->parentNode;
66 $document = new \DOMDocument();
67 $document->loadXML($this->
getContent($node->getAttribute(static::INCLUDE_PATH)));
69 foreach ($this->
getChildNodes($document->documentElement) as $child) {
70 $compiler->
compile($child, $processedObject, $context);
73 $newFragment = $ownerDocument->createDocumentFragment();
74 foreach ($document->documentElement->childNodes as $child) {
75 $newFragment->appendXML($document->saveXML($child));
78 $parentNode->replaceChild($newFragment, $node);
90 foreach ($node->childNodes as $child) {
91 $childNodes[] = $child;
107 list($moduleName, $filename) = explode(
'::', $includePath);
109 $path =
'adminhtml/' . $filename;
110 $directoryRead = $this->readFactory->create(
111 $this->moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, $moduleName)
114 if ($directoryRead->isExist(
$path) && $directoryRead->isFile(
$path)) {
115 return $directoryRead->readFile(
$path);
compile(CompilerInterface $compiler, \DOMElement $node, DataObject $processedObject, DataObject $context)
compile(\DOMNode $node, DataObject $dataObject, DataObject $context)
getChildNodes(\DOMElement $node)
__construct(Reader $moduleReader, Filesystem\Directory\ReadFactory $readFactory)