File tree Expand file tree Collapse file tree 5 files changed +44
-0
lines changed Expand file tree Collapse file tree 5 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1818- Added: Generator command for sample widget.xml file
1919- Added: Generator command for sample extension_attributes.xml file
2020- Added: Generator command for sample system.xml file
21+ - Added: Generator command for sample config.xml file
2122
2223## [ 1.1.3] - 3/12/2025
2324
Original file line number Diff line number Diff line change 158158 {
159159 "command" : " magento-toolbox.generateSystemXmlFile" ,
160160 "title" : " Magento Toolbox: Generate System XML"
161+ },
162+ {
163+ "command" : " magento-toolbox.generateConfigXmlFile" ,
164+ "title" : " Magento Toolbox: Generate Config XML"
161165 }
162166 ],
163167 "menus" : {
279283 {
280284 "command" : " magento-toolbox.generateSystemXmlFile" ,
281285 "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
286+ },
287+ {
288+ "command" : " magento-toolbox.generateConfigXmlFile" ,
289+ "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
282290 }
283291 ]
284292 }
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 GenerateConfigXmlFileCommand extends SimpleTemplateGeneratorCommand {
6+ constructor ( ) {
7+ super ( 'magento-toolbox.generateConfigXmlFile' ) ;
8+ }
9+
10+ getWizardTitle ( ) : string {
11+ return 'Config XML File' ;
12+ }
13+
14+ getFileHeader ( data : TemplateWizardData ) : string | undefined {
15+ return FileHeader . getHeader ( data . module ) ;
16+ }
17+
18+ getFilePath ( data : TemplateWizardData ) : string {
19+ const [ vendor , module ] = data . module . split ( '_' ) ;
20+
21+ return `app/code/${ vendor } /${ module } /etc/config.xml` ;
22+ }
23+
24+ getTemplateName ( data : TemplateWizardData ) : string {
25+ return 'xml/blank-config' ;
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -24,3 +24,4 @@ export { default as GenerateMviewXmlFileCommand } from './GenerateMviewXmlFileCo
2424export { default as GenerateWidgetXmlFileCommand } from './GenerateWidgetXmlFileCommand' ;
2525export { default as GenerateExtensionAttributesXmlFileCommand } from './GenerateExtensionAttributesXmlFileCommand' ;
2626export { default as GenerateSystemXmlFileCommand } from './GenerateSystemXmlFileCommand' ;
27+ export { default as GenerateConfigXmlFileCommand } from './GenerateConfigXmlFileCommand' ;
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_Store:etc/config.xsd" >
7+ </config >
You can’t perform that action at this time.
0 commit comments