11{
2+ /**
3+ *
4+ * All code in snippets retrieved from
5+ * http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/xml-instructions.html
6+ *
7+ */
8+
29 "Layout Base" : {
3- "prefix" : " m2-layout " ,
10+ "prefix" : " m2l-base " ,
411 "body" : [
512 " <?xml version=\" 1.0\" ?>" ,
613 " <page xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\" urn:magento:framework:View/Layout/etc/page_configuration.xsd\" >" ,
714 " \t <body>" ,
8- " \t\t $0"
15+ " \t\t $0" ,
916 " \t </body>" ,
1017 " </page>"
1118 ],
1219 "description" : " Base layout code for every layout file"
1320 },
21+ "Block" : {
22+ "prefix" : " m2l-block" ,
23+ "body" : [
24+ " <block class=\" $1\" name=\" $3\" as=\" $5\" template=\" $7\" />$0" ,
25+ ],
26+ "description" : " Defines a block"
27+ },
28+ "Block Wrap" : {
29+ "prefix" : " m2l-block-wrap" ,
30+ "body" : [
31+ " <block class=\" $1\" name=\" $3\" as=\" $5\" template=\" $7\" />" ,
32+ " \t $0" ,
33+ " </block>"
34+ ],
35+ "description" : " Defines a wrapping block"
36+ },
37+ "Container" : {
38+ "prefix" : " m2l-container" ,
39+ "body" : [
40+ " <container name=\" $1\" label=\" $2\" output=\" ${3:0}\" htmlTag=\" $4\" htmlId=\" $5\" htmlClass=\" $6\" />$0"
41+ ],
42+ "description" : " A structure without content that holds other layout elements such as blocks and containers"
43+ },
44+ "Container Wrap" : {
45+ "prefix" : " m2l-container-wrap" ,
46+ "body" : [
47+ " <container name=\" $1\" label=\" $2\" output=\" ${3:0}\" htmlTag=\" $4\" htmlId=\" $5\" htmlClass=\" $6\" >" ,
48+ " \t $0" ,
49+ " </container>"
50+ ],
51+ "description" : " A structure without content that holds other layout elements such as blocks and containers"
52+ },
53+ "Reference Block" : {
54+ "prefix" : " m2l-refblock" ,
55+ "body" : [
56+ " <referenceBlock name=\" $1\" >" ,
57+ " \t $0" ,
58+ " </referenceBlock>"
59+ ],
60+ "description" : " Targets blocks and applies updates specified"
61+ },
62+ "Reference Container" : {
63+ "prefix" : " m2l-refcontainer" ,
64+ "body" : [
65+ " <referenceContainer name=\" $1\" >" ,
66+ " \t $0" ,
67+ " </referenceContainer>"
68+ ],
69+ "description" : " Targets containers and applies updates specified"
70+ },
71+ "Move" : {
72+ "prefix" : " m2l-move" ,
73+ "body" : [
74+ " <move element=\" $1\" destination=\" $2\" />$0"
75+ ],
76+ "description" : " Sets the declared block or container element as a child of another element in the specified order"
77+ },
78+ "Remove" : {
79+ "prefix" : " m2l-remove" ,
80+ "body" : [
81+ " <remove src=\" $1\" />$0"
82+ ],
83+ "description" : " Is used only to remove the static resources linked in a page <head> section"
84+ },
85+ "Update" : {
86+ "prefix" : " m2l-update" ,
87+ "body" : [
88+ " <update handle=\" $0\" />"
89+ ],
90+ "description" : " Includes a certain layout file"
91+ },
92+ "Arguements" : {
93+ "prefix" : " m2l-args" ,
94+ "body" : [
95+ " <arguments>" ,
96+ " \t $0" ,
97+ " </arguments>"
98+ ],
99+ "description" : " Includes a certain layout file"
100+ },
101+ "Arguement" : {
102+ "prefix" : " m2l-arg" ,
103+ "body" : [
104+ " <argument name=\" ${1:name}\" xsi:type=\" ${2:type|string,boolean,object,number,null,array|}\" >$0</argument>" ,
105+ ],
106+ "description" : " Includes a certain layout file"
107+ },
14108}
0 commit comments