|
@@ 129-145 (lines=17) @@
|
| 126 |
|
* @param string $relativePath |
| 127 |
|
* @param string $name |
| 128 |
|
*/ |
| 129 |
|
private function createThemeXmlFile(OutputInterface $output, $appDirWriter, $relativePath, $name) |
| 130 |
|
{ |
| 131 |
|
$xmlContent = <<<XML_CONTENT |
| 132 |
|
<?xml version="1.0"?> |
| 133 |
|
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> |
| 134 |
|
<title>$name</title> |
| 135 |
|
<parent>Magento/blank</parent> |
| 136 |
|
<media> |
| 137 |
|
<preview_image>media/preview.jpg</preview_image> |
| 138 |
|
</media> |
| 139 |
|
</theme> |
| 140 |
|
XML_CONTENT; |
| 141 |
|
|
| 142 |
|
$appDirWriter->writeFile($relativePath . '/theme.xml', $xmlContent); |
| 143 |
|
$output->writeln('<info>generated </info><comment>' . $relativePath . '/theme.xml</comment>'); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
/** |
| 147 |
|
* @param OutputInterface $output |
| 148 |
|
* @param \Magento\Framework\Filesystem\Directory\WriteInterface $appDirWriter |
|
@@ 151-162 (lines=12) @@
|
| 148 |
|
* @param \Magento\Framework\Filesystem\Directory\WriteInterface $appDirWriter |
| 149 |
|
* @param string $relativePath |
| 150 |
|
*/ |
| 151 |
|
private function createViewXmlFile(OutputInterface $output, $appDirWriter, $relativePath) |
| 152 |
|
{ |
| 153 |
|
$xmlContent = <<<XML_CONTENT |
| 154 |
|
<?xml version="1.0"?> |
| 155 |
|
<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd"> |
| 156 |
|
</view> |
| 157 |
|
XML_CONTENT; |
| 158 |
|
|
| 159 |
|
$appDirWriter->writeFile($relativePath . '/etc/view.xml', $xmlContent); |
| 160 |
|
$output->writeln('<info>generated </info><comment>' . $relativePath . '/etc/view.xml</comment>'); |
| 161 |
|
} |
| 162 |
|
} |
| 163 |
|
|