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 @@ -9,6 +9,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
99- Added: Generator command for sample Layout XML file
1010- Added: Generator command for sample page_types.xml file
1111- Added: Generator command for sample crontab.xml file
12+ - Added: Generator command for sample email_templates.xml file
1213
1314## [ 1.1.3] - 3/12/2025
1415
Original file line number Diff line number Diff line change 122122 {
123123 "command" : " magento-toolbox.generateCrontabXmlFile" ,
124124 "title" : " Magento Toolbox: Generate Crontab XML"
125+ },
126+ {
127+ "command" : " magento-toolbox.generateEmailTemplatesXmlFile" ,
128+ "title" : " Magento Toolbox: Generate Email Templates XML"
125129 }
126130 ],
127131 "menus" : {
207211 {
208212 "command" : " magento-toolbox.generateCrontabXmlFile" ,
209213 "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
214+ },
215+ {
216+ "command" : " magento-toolbox.generateEmailTemplatesXmlFile" ,
217+ "when" : " resourcePath =~ /app\\ /code\\ /.+\\ /.+/i"
210218 }
211219 ]
212220 }
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 GenerateEmailTemplatesXmlCommand extends SimpleTemplateGeneratorCommand {
6+ constructor ( ) {
7+ super ( 'magento-toolbox.generateEmailTemplatesXmlFile' ) ;
8+ }
9+
10+ getWizardTitle ( ) : string {
11+ return 'Email Templates 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/email_templates.xml` ;
22+ }
23+
24+ getTemplateName ( data : TemplateWizardData ) : string {
25+ return 'xml/blank-email-templates' ;
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ export { default as GenerateLayoutXmlCommand } from './GenerateLayoutXmlCommand'
1515export { default as GenerateWebapiXmlFileCommand } from './GenerateWebapiXmlFileCommand' ;
1616export { default as GeneratePageTypesXmlCommand } from './GeneratePageTypesXmlCommand' ;
1717export { default as GenerateCrontabXmlCommand } from './GenerateCrontabXmlCommand' ;
18+ export { default as GenerateEmailTemplatesXmlCommand } from './GenerateEmailTemplatesXmlCommand' ;
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_Email:etc/email_templates.xsd" >
7+ </config >
You can’t perform that action at this time.
0 commit comments