Skip to content

Commit 1426d40

Browse files
authored
Merge pull request #11 from leonhelmus/master
Changed version tag of composer and added extra line in README.md
2 parents e8b4e98 + 082b1fc commit 1426d40

34 files changed

+336
-141
lines changed

COMMANDS.md

+15
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This way Namespaces and vendor will be automatically filled in.
2323

2424
Available templates:
2525
* **M2 class**: Default M2 php class.
26+
* **M2 class - Backend Controller**: PHP class that extends AbstractAction.
2627
* **M2 class - Block**: PHP class that extends Template class.
2728
* **M2 class - Helper**: PHP class that extends AbstractHelper
2829
* **M2 class - Observer**: PHP class that implements ObserverInterface
@@ -70,6 +71,13 @@ Available commands:
7071
* **m2divirtual**: Create an virtual type
7172
* **m2dipreference**: Create an preference(rewrite)
7273

74+
## M2 Events
75+
Available templates:
76+
* **M2 Events**: Create an events file.
77+
78+
Available commands:
79+
* **m2eventobserver**: Create an observer
80+
7381
## M2 Extension Attribute
7482
Available templates:
7583
* **M2 Extension Attributes XML**: Create an extension attribute file with default structure.
@@ -78,6 +86,13 @@ Available templates:
7886
Available templates:
7987
* **M2 Layout XML**: Create an layout XML with default structure
8088

89+
## M2 Menu
90+
Available templates:
91+
* **M2 Menu XML**: Create an layout XML with default structure
92+
93+
Available commands:
94+
* **m2menuadd**: Create an menu tag
95+
8196
## M2 Module
8297
Available templates:
8398
* **M2 Module XML**: Create an module XML file that has default structure

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ Use PHPStorm's `file > settings > language > PHP` menu to point to the installed
1414

1515
## Live Templates
1616
You now get live templates that can be be found in `file > settings > Editor -> Live Templates` .
17-
These can be enabled and disabled for if you want to use them or not.
17+
These templates can be enabled/disabled.
1818
At this moment there have been live templates created for:
1919
* ACL
2020
* DB Schema
2121
* DI
22+
* Events
23+
* Menu
2224
* Module
2325
* Phtml (WIP)
2426
* Registration
@@ -28,21 +30,25 @@ Check out [this link](COMMANDS.md) to see more info
2830

2931
## Templates
3032
You now get live templates that can be be found in `file > settings > Editor -> File and Code Templates` .
31-
These can be enabled and disabled for if you want to use them or not.
33+
These can be enabled and disabled for if you want to use them or not. If no phpstorm templates are shown please restart PhpStorm.
3234
At this moment there have been templates created for:
3335
* ACL
3436
* Class
37+
* Class - Backend Controller
3538
* Class - Block
3639
* Class - Helper
3740
* Class - Observer
3841
* Class - ViewModel
3942
* Config
4043
* DB Schema
4144
* DI
45+
* Events
4246
* Extension Attributes
4347
* Layout
48+
* Menu
4449
* Module
4550
* Registration
51+
* Routes
4652
* Sales
4753
* System
4854
* System Include

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"email": "contact@mediact.nl"
1010
}
1111
],
12-
"version": "1.7.0",
12+
"version": "2.0.0",
1313
"require": {
1414
"php": "^7.1",
1515
"composer-plugin-api": "^1.0"

files/codeStyleSettings.xml

-100
This file was deleted.

files/codeStyles/Project.xml

+185
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
<component name="ProjectCodeStyleConfiguration">
2+
<code_scheme name="Project" version="173">
3+
<option name="RIGHT_MARGIN" value="80" />
4+
<CssCodeStyleSettings>
5+
<option name="HEX_COLOR_LOWER_CASE" value="true" />
6+
</CssCodeStyleSettings>
7+
<HTMLCodeStyleSettings>
8+
<option name="HTML_ATTRIBUTE_WRAP" value="4" />
9+
<option name="HTML_TEXT_WRAP" value="0" />
10+
<option name="HTML_KEEP_LINE_BREAKS" value="false" />
11+
<option name="HTML_KEEP_LINE_BREAKS_IN_TEXT" value="false" />
12+
<option name="HTML_KEEP_BLANK_LINES" value="0" />
13+
<option name="HTML_ALIGN_ATTRIBUTES" value="false" />
14+
<option name="HTML_ELEMENTS_TO_INSERT_NEW_LINE_BEFORE" value="body,div,form,h1,h2,h3" />
15+
<option name="HTML_INLINE_ELEMENTS" value="abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var" />
16+
<option name="HTML_DONT_ADD_BREAKS_IF_INLINE_CONTENT" value="title,h1,h2,h3,h4,h5,h6" />
17+
<option name="HTML_ENFORCE_QUOTES" value="true" />
18+
</HTMLCodeStyleSettings>
19+
<PHPCodeStyleSettings>
20+
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
21+
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
22+
<option name="ALIGN_ASSIGNMENTS" value="true" />
23+
<option name="ALIGN_INLINE_COMMENTS" value="true" />
24+
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
25+
<option name="PHPDOC_KEEP_BLANK_LINES" value="false" />
26+
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
27+
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
28+
<option name="LOWER_CASE_NULL_CONST" value="true" />
29+
<option name="ELSE_IF_STYLE" value="COMBINE" />
30+
<option name="VARIABLE_NAMING_STYLE" value="CAMEL_CASE" />
31+
<option name="BLANK_LINE_BEFORE_RETURN_STATEMENT" value="true" />
32+
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
33+
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
34+
<option name="ALIGN_CLASS_CONSTANTS" value="true" />
35+
<option name="KEEP_BLANK_LINES_AFTER_LBRACE" value="0" />
36+
<option name="SPACE_AFTER_UNARY_NOT" value="true" />
37+
<option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
38+
</PHPCodeStyleSettings>
39+
<XML>
40+
<option name="XML_ATTRIBUTE_WRAP" value="4" />
41+
<option name="XML_TEXT_WRAP" value="0" />
42+
<option name="XML_KEEP_LINE_BREAKS" value="false" />
43+
<option name="XML_KEEP_BLANK_LINES" value="1" />
44+
<option name="XML_ALIGN_ATTRIBUTES" value="false" />
45+
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
46+
</XML>
47+
<codeStyleSettings language="CSS">
48+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
49+
<arrangement>
50+
<rules>
51+
<section>
52+
<rule>
53+
<match>
54+
<NAME>.*</NAME>
55+
</match>
56+
<order>BY_NAME</order>
57+
</rule>
58+
</section>
59+
</rules>
60+
</arrangement>
61+
</codeStyleSettings>
62+
<codeStyleSettings language="DB2">
63+
<indentOptions>
64+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
65+
</indentOptions>
66+
</codeStyleSettings>
67+
<codeStyleSettings language="Derby">
68+
<indentOptions>
69+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
70+
</indentOptions>
71+
</codeStyleSettings>
72+
<codeStyleSettings language="H2">
73+
<indentOptions>
74+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
75+
</indentOptions>
76+
</codeStyleSettings>
77+
<codeStyleSettings language="HSQLDB">
78+
<indentOptions>
79+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
80+
</indentOptions>
81+
</codeStyleSettings>
82+
<codeStyleSettings language="JSON">
83+
<indentOptions>
84+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
85+
</indentOptions>
86+
</codeStyleSettings>
87+
<codeStyleSettings language="JavaScript">
88+
<option name="LINE_COMMENT_ADD_SPACE" value="false" />
89+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
90+
<option name="SPECIAL_ELSE_IF_TREATMENT" value="false" />
91+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
92+
<option name="CALL_PARAMETERS_WRAP" value="1" />
93+
<option name="METHOD_PARAMETERS_WRAP" value="5" />
94+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
95+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
96+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
97+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
98+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
99+
<option name="IF_BRACE_FORCE" value="3" />
100+
<option name="DOWHILE_BRACE_FORCE" value="3" />
101+
<option name="WHILE_BRACE_FORCE" value="3" />
102+
<option name="FOR_BRACE_FORCE" value="3" />
103+
</codeStyleSettings>
104+
<codeStyleSettings language="LESS">
105+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
106+
<indentOptions>
107+
<option name="INDENT_SIZE" value="4" />
108+
</indentOptions>
109+
</codeStyleSettings>
110+
<codeStyleSettings language="MySQL">
111+
<indentOptions>
112+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
113+
</indentOptions>
114+
</codeStyleSettings>
115+
<codeStyleSettings language="Oracle">
116+
<indentOptions>
117+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
118+
</indentOptions>
119+
</codeStyleSettings>
120+
<codeStyleSettings language="PHP">
121+
<option name="RIGHT_MARGIN" value="120" />
122+
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
123+
<option name="KEEP_FIRST_COLUMN_COMMENT" value="false" />
124+
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
125+
<option name="KEEP_BLANK_LINES_IN_CODE" value="0" />
126+
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="0" />
127+
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
128+
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
129+
<option name="ALIGN_MULTILINE_FOR" value="false" />
130+
<option name="SPACE_AFTER_TYPE_CAST" value="true" />
131+
<option name="CALL_PARAMETERS_WRAP" value="5" />
132+
<option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
133+
<option name="CALL_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
134+
<option name="METHOD_PARAMETERS_WRAP" value="5" />
135+
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
136+
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
137+
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
138+
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
139+
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
140+
<option name="IF_BRACE_FORCE" value="3" />
141+
<option name="DOWHILE_BRACE_FORCE" value="3" />
142+
<option name="WHILE_BRACE_FORCE" value="3" />
143+
<option name="FOR_BRACE_FORCE" value="3" />
144+
<option name="WRAP_ON_TYPING" value="0" />
145+
</codeStyleSettings>
146+
<codeStyleSettings language="PostgreSQL">
147+
<indentOptions>
148+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
149+
</indentOptions>
150+
</codeStyleSettings>
151+
<codeStyleSettings language="SASS">
152+
<indentOptions>
153+
<option name="INDENT_SIZE" value="4" />
154+
</indentOptions>
155+
</codeStyleSettings>
156+
<codeStyleSettings language="SCSS">
157+
<indentOptions>
158+
<option name="INDENT_SIZE" value="4" />
159+
</indentOptions>
160+
</codeStyleSettings>
161+
<codeStyleSettings language="SQL">
162+
<indentOptions>
163+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
164+
</indentOptions>
165+
</codeStyleSettings>
166+
<codeStyleSettings language="SQLite">
167+
<indentOptions>
168+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
169+
</indentOptions>
170+
</codeStyleSettings>
171+
<codeStyleSettings language="Sybase">
172+
<indentOptions>
173+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
174+
</indentOptions>
175+
</codeStyleSettings>
176+
<codeStyleSettings language="TSQL">
177+
<indentOptions>
178+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
179+
</indentOptions>
180+
</codeStyleSettings>
181+
<codeStyleSettings language="XML">
182+
<option name="RIGHT_MARGIN" value="800" />
183+
</codeStyleSettings>
184+
</code_scheme>
185+
</component>

files/codeStyles/codeStyleConfig.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<component name="ProjectCodeStyleConfiguration">
2+
<state>
3+
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
4+
</state>
5+
</component>

files/fileTemplates/M2-Acl-XML.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
#parse("M2 XML File Header")
2+
#parse("M2-XML-File-Header")
33
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
44
<acl>
55
<resources>

0 commit comments

Comments
 (0)