@@ -47,6 +47,47 @@ A nice start to a collection of Magento 2 code snippets for Visual Studio Code!
4747 </ul >
4848</details >
4949
50+ ### Modules
51+ <details >
52+ <summary ><a href =" #mod-instructions " >Instructions</a ></summary >
53+ <ul >
54+ <li><a href="#module-xml">Module XML</a></li>
55+ <li><a href="#registration-php">Registration</a></li>
56+ </ul >
57+ </details >
58+
59+ ### DI
60+ <details >
61+ <summary ><a href =" #di-instructions " >Instructions</a ></summary >
62+ <ul >
63+ <li><a href="#di-scaffold">Scaffold</a></li>
64+ <li><a href="#preference">Preference</a></li>
65+ <li><a href="#type">Type</a></li>
66+ <li><a href="#virtual-type">Virtual Type</a></li>
67+ </ul >
68+ </details >
69+
70+ ### Events
71+ <details >
72+ <summary ><a href =" #events-instructions " >Instructions</a ></summary >
73+ <ul >
74+ <li><a href="#events-scaffold">Scaffold</a></li>
75+ <li><a href="#event">Event</a></li>
76+ <li><a href="#observer">Observer</a></li>
77+ </ul >
78+ </details >
79+
80+ ### Routes
81+ <details >
82+ <summary ><a href =" #routes-instructions " >Instructions</a ></summary >
83+ <ul >
84+ <li><a href="#routes-scaffold">Scaffold</a></li>
85+ <li><a href="#routers">Routers</a></li>
86+ <li><a href="#route">Route</a></li>
87+ </ul >
88+ </details >
89+
90+
5091# Layouts
5192
5293## Instructions
@@ -345,3 +386,189 @@ display=""
345386``` xml
346387remove=""
347388```
389+
390+
391+ # Modules
392+
393+ ## Module Instructions
394+
395+ ### Module XML
396+
397+ ** Trigger:** ` m2.module `
398+
399+ ** Output:**
400+ ``` xml
401+ <?xml version =" 1.0" ?>
402+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
403+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:ObjectManager/etc/module.xsd" >
404+ <module name =" " setup_version =" 0.1.0" />
405+
406+ </config >
407+ ```
408+
409+ ### Registration
410+
411+ ** Trigger:** ` m2.module.registration `
412+
413+ ** Output:**
414+ ``` php
415+ \Magento\Framework\Component\ComponentRegistrar::register(
416+ \Magento\Framework\Component\ComponentRegistrar::MODULE,
417+ '',
418+ __DIR__
419+ );
420+ ```
421+
422+
423+ # DI
424+
425+ ## DI Instructions
426+
427+ ### DI Scaffold
428+
429+ ** Trigger:** ` m2.di `
430+
431+ ** Output:**
432+ ``` xml
433+ <?xml version =" 1.0" ?>
434+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
435+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:ObjectManager/etc/config.xsd" >
436+
437+ </config >
438+ ```
439+
440+ ### Preference
441+
442+ ** Trigger:** ` m2.di.pref `
443+
444+ ** Output:**
445+ ``` xml
446+ <preference for =" " type =" " />
447+ ```
448+
449+ ### Type
450+
451+ ** Trigger:** ` m2.di.type `
452+
453+ ** Output:**
454+ ``` xml
455+ <type name =" " >
456+
457+ </type >
458+ ```
459+
460+ #### Type Arguments
461+
462+ ** Trigger:** ` m2.di.type.args `
463+
464+ ** Output:**
465+ ``` xml
466+ <arguments >
467+ <argument name =" " xsi : type =" " ></argument >
468+ </arguments >
469+ ```
470+
471+ #### Type Arguments Item
472+
473+ ** Trigger:** ` m2.di.type.args.item `
474+
475+ ** Output:**
476+ ``` xml
477+ <item name =" " xsi : type =" " ></item >
478+ ```
479+
480+ ### Virtual Type
481+
482+ ** Trigger:** ` m2.di.virtualtype `
483+
484+ ** Output:**
485+ ``` xml
486+ <virtualType name =" " type =" " >
487+
488+ </virtualType >
489+ ```
490+
491+
492+ # Events
493+
494+ ## Events Instructions
495+
496+ ### Events Scaffold
497+
498+ ** Trigger:** ` m2.events `
499+
500+ ** Output:**
501+ ``` xml
502+ <?xml version =" 1.0" ?>
503+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
504+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:Event/etc/events.xsd" >
505+
506+ </config >
507+ ```
508+
509+
510+ ### Event
511+
512+ ** Trigger:** ` m2.events.event `
513+
514+ ** Output:**
515+ ``` xml
516+ <event name =" " >
517+
518+ </event >
519+ ```
520+
521+
522+ ### Observer
523+
524+ ** Trigger:** ` m2.events.observer `
525+
526+ ** Output:**
527+ ``` xml
528+ <observer name =" " instance =" " />
529+ ```
530+
531+
532+ # Routes
533+
534+ ## Routes Instructions
535+
536+ ### Routes Scaffold
537+
538+ ** Trigger:** ` m2.routes `
539+
540+ ** Output:**
541+ ``` xml
542+ <?xml version =" 1.0" ?>
543+ <config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
544+ xsi : noNamespaceSchemaLocation =" urn:magento:framework:App/etc/routes.xsd" >
545+
546+ </config >
547+ ```
548+
549+
550+ ### Routers
551+
552+ ** Trigger:** ` m2.routes.router `
553+
554+ ** Output:**
555+ ``` xml
556+ <router id =" " >
557+
558+ </router >
559+ ```
560+
561+
562+ ### Route
563+
564+ ** Trigger:** ` m2.routes.route `
565+
566+ ** Output:**
567+ ``` xml
568+ <route id =" " frontName =" " >
569+ <module name =" " />
570+ </route >
571+ ```
572+
573+
574+
0 commit comments