File tree Expand file tree Collapse file tree 5 files changed +46
-0
lines changed Expand file tree Collapse file tree 5 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1717- Added: Generator command for sample mview.xml file
1818- Added: Generator command for sample widget.xml file
1919- Added: Generator command for sample extension_attributes.xml file
20+ - Added: Generator command for sample system.xml file
2021
2122## [ 1.1.3] - 3/12/2025
2223
Original file line number Diff line number Diff line change 154154 {
155155 "command" : " magento-toolbox.generateExtensionAttributesXmlFile" ,
156156 "title" : " Magento Toolbox: Generate Extension Attributes XML"
157+ },
158+ {
159+ "command" : " magento-toolbox.generateSystemXmlFile" ,
160+ "title" : " Magento Toolbox: Generate System XML"
157161 }
158162 ],
159163 "menus" : {
271275 {
272276 "command" : " magento-toolbox.generateExtensionAttributesXmlFile" ,
273277 "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
278+ },
279+ {
280+ "command" : " magento-toolbox.generateSystemXmlFile" ,
281+ "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
274282 }
275283 ]
276284 }
Original file line number Diff line number Diff line change 1+ import { SimpleTemplateGeneratorCommand } from './SimpleTemplateGeneratorCommand' ;
2+ import { TemplateWizardData } from 'wizard/SimpleTemplateWizard' ;
3+ import FileHeader from 'common/xml/FileHeader' ;
4+
5+ export default class GenerateSystemXmlFileCommand extends SimpleTemplateGeneratorCommand {
6+ constructor ( ) {
7+ super ( 'magento-toolbox.generateSystemXmlFile' ) ;
8+ }
9+
10+ getFileHeader ( data : TemplateWizardData ) : string | undefined {
11+ return FileHeader . getHeader ( data . module ) ;
12+ }
13+
14+ getWizardTitle ( ) : string {
15+ return 'System XML File' ;
16+ }
17+
18+ getFilePath ( data : TemplateWizardData ) : string {
19+ const [ vendor , module ] = data . module . split ( '_' ) ;
20+
21+ return `app/code/${ vendor } /${ module } /etc/adminhtml/system.xml` ;
22+ }
23+
24+ getTemplateName ( data : TemplateWizardData ) : string {
25+ return 'xml/blank-system' ;
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -23,3 +23,4 @@ export { default as GenerateIndexerXmlFileCommand } from './GenerateIndexerXmlFi
2323export { default as GenerateMviewXmlFileCommand } from './GenerateMviewXmlFileCommand' ;
2424export { default as GenerateWidgetXmlFileCommand } from './GenerateWidgetXmlFileCommand' ;
2525export { default as GenerateExtensionAttributesXmlFileCommand } from './GenerateExtensionAttributesXmlFileCommand' ;
26+ export { default as GenerateSystemXmlFileCommand } from './GenerateSystemXmlFileCommand' ;
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <% if (fileHeader) { -% >
3+ < %- fileHeader % >
4+ < % } - %>
5+ <config xmlns:xsi =" http://www.w3.org/2001/XMLSchema-instance"
6+ xsi:noNamespaceSchemaLocation =" urn:magento:module:Magento_Config:etc/system_file.xsd" >
7+ <system >
8+ </system >
9+ </config >
You can’t perform that action at this time.
0 commit comments