File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
app/code/Magento/Developer/Model/XmlCatalog/Format Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 18
18
*/
19
19
class PhpStorm implements FormatInterface
20
20
{
21
+ private const PROJECT_PATH_IDENTIFIER = '$PROJECT_DIR$ ' ;
22
+
21
23
/**
22
24
* @var ReadInterface
23
25
*/
@@ -95,7 +97,7 @@ public function generateCatalog(array $dictionary, $configFilePath)
95
97
foreach ($ dictionary as $ urn => $ xsdPath ) {
96
98
$ node = $ dom ->createElement ('resource ' );
97
99
$ node ->setAttribute ('url ' , $ urn );
98
- $ node ->setAttribute ('location ' , $ xsdPath );
100
+ $ node ->setAttribute ('location ' , $ this -> getFileLocationInProject ( $ xsdPath) );
99
101
$ componentNode ->appendChild ($ node );
100
102
}
101
103
$ dom ->formatOutput = true ;
@@ -129,4 +131,15 @@ private function initEmptyFile(\DOMDocument $dom)
129
131
$ projectNode ->appendChild ($ rootComponentNode );
130
132
return $ projectNode ;
131
133
}
134
+
135
+ /**
136
+ * Resolve xsdpath to xml project path
137
+ *
138
+ * @param string $xsdPath
139
+ * @return string
140
+ */
141
+ private function getFileLocationInProject (string $ xsdPath ): string
142
+ {
143
+ return self ::PROJECT_PATH_IDENTIFIER . DIRECTORY_SEPARATOR . $ this ->currentDirRead ->getRelativePath ($ xsdPath );
144
+ }
132
145
}
You can’t perform that action at this time.
0 commit comments