|
| 1 | +{ |
| 2 | + "DI Scaffold": { |
| 3 | + "prefix": "m2.di", |
| 4 | + "body": [ |
| 5 | + "<?xml version=\"1.0\"?>", |
| 6 | + "<config xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" ", |
| 7 | + "\t\txsi:noNamespaceSchemaLocation=\"urn:magento:framework:ObjectManager/etc/config.xsd\">", |
| 8 | + "\t$0", |
| 9 | + "</config>" |
| 10 | + ], |
| 11 | + "description": "Magento 2 DI scaffold" |
| 12 | + }, |
| 13 | + "DI Preference": { |
| 14 | + "prefix": "m2.di.pref", |
| 15 | + "body": [ |
| 16 | + "<preference for=\"${1:Fully Qualified Classname}\" type=\"${2:Fully Qualified Classname}\" />$0" |
| 17 | + ], |
| 18 | + "description": "Magento 2 DI preference" |
| 19 | + }, |
| 20 | + "DI Type": { |
| 21 | + "prefix": "m2.di.type", |
| 22 | + "body": [ |
| 23 | + "<type name=\"${1:Fully Qualified Classname}\">", |
| 24 | + "\t$0", |
| 25 | + "</type>" |
| 26 | + ], |
| 27 | + "description": "Magento 2 DI type" |
| 28 | + }, |
| 29 | + "DI Plugin": { |
| 30 | + "prefix": "m2.di.plugin", |
| 31 | + "body": [ |
| 32 | + "<plugin name=\"${1:plugin_name}\" ", |
| 33 | + "\ttype=\"${2:Fully Qualified Classname}\"", |
| 34 | + "\tsortOrder=\"${3}\"/>$0" |
| 35 | + ] |
| 36 | + }, |
| 37 | + "DI Type Arguments": { |
| 38 | + "prefix": "m2.di.args", |
| 39 | + "body": [ |
| 40 | + "<arguments>", |
| 41 | + "\t<argument name=\"${1:Constructor Argument}\" xsi:type=\"${2|array,boolean,number,null,object,string|}\">$3</argument>", |
| 42 | + "</arguments>$0" |
| 43 | + ], |
| 44 | + "description": "Magento 2 DI type arguments" |
| 45 | + }, |
| 46 | + "DI Type Argument Item": { |
| 47 | + "prefix": "m2.di.args.item", |
| 48 | + "body": [ |
| 49 | + "<item name=\"${1}\" xsi:type=\"${2|array,boolean,number,null,object,string|}\">$3</item>$0" |
| 50 | + ], |
| 51 | + "description": "Magento 2 DI type argument item" |
| 52 | + }, |
| 53 | + "DI Virtual Type": { |
| 54 | + "prefix": "m2.di.virtualtype", |
| 55 | + "body": [ |
| 56 | + "<virtualType name=\"${1:Virtual Type Name}\" type=\"${2:Fully Qualified Classname}\">", |
| 57 | + "\t$0", |
| 58 | + "</virtualType>" |
| 59 | + ], |
| 60 | + "description": "Magento 2 DI type" |
| 61 | + } |
| 62 | +} |
0 commit comments