forked from koomai/phpstorm-laravel-live-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Laravel_Form.xml
176 lines (176 loc) · 12.3 KB
/
Laravel_Form.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="Laravel-Form">
<template name="Form::open" value="{!! Form::open(['$TYPE$' => '$TARGET$'$OPTIONS$]) !!} 	$END$ {!! Form::close() !!}" description="Open a Form" toReformat="false" toShortenFQNames="true">
<variable name="TYPE" expression="enum("route", "url", "action")" defaultValue=""route"" alwaysStopAt="true" />
<variable name="TARGET" expression="" defaultValue=""route.name"" alwaysStopAt="true" />
<variable name="OPTIONS" expression="" defaultValue="", 'method' => 'post'"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::openWithFileUpload" value="{!! Form::open(['$TYPE$' => '$TARGET$',$OPTIONS$ 'files' => true]) !!} 	$END$ {!! Form::close() !!}" description="Open a Form and Enable File Upload" toReformat="false" toShortenFQNames="true">
<variable name="TYPE" expression="enum("route", "url", "action")" defaultValue=""route"" alwaysStopAt="true" />
<variable name="TARGET" expression="" defaultValue=""route.name"" alwaysStopAt="true" />
<variable name="OPTIONS" expression="" defaultValue="" 'method' => 'post'"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::model" value="{!! Form::model($MODEL$, ['$TYPE$' => $TARGET$$OPTIONS$]) !!} 	$END$ {!! Form::close() !!}" description="Open a Form with Model Binding" toReformat="false" toShortenFQNames="true">
<variable name="MODEL" expression="" defaultValue=""$user"" alwaysStopAt="true" />
<variable name="TYPE" expression="enum("route", "url", "action")" defaultValue=""route"" alwaysStopAt="true" />
<variable name="TARGET" expression="" defaultValue=""['user.update', $user->id]"" alwaysStopAt="true" />
<variable name="OPTIONS" expression="" defaultValue="", 'method' => 'post'"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::label" value="{!! Form::label('$NAME$', '$DEFAULT$'$OPTION$) !!}$END$" description="Generate a Label element" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""email"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="capitalize(NAME)" defaultValue="" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'control-label']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::text" value="{!! Form::text('$NAME$', '$DEFAULT$'$OPTION$) !!}$END$" description="Generate a Text Input element (name, default, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""email"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="capitalize(NAME)" defaultValue="" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::hidden" value="{!! Form::hidden('$NAME$', '$DEFAULT$'$OPTION$) !!}$END$" description="Generate a Hidden Input element (name, default)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""name"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="" defaultValue="value" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['id' => 'id']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::textarea" value="{!! Form::textarea('$NAME$', '$DEFAULT$'$OPTION$) !!}$END$" description="Generate a Textarea Input element (name, default, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""body"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="capitalize(NAME)" defaultValue="" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::email" value="{!! Form::email('$NAME$', '$DEFAULT$'$OPTION$) !!}$END$" description="Generate an Email Input element (name, default, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""email"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="capitalize(NAME)" defaultValue="" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::checkbox" value="<label> 	{!! Form::checkbox('$NAME$', '$DEFAULT$', $CHECKED$ ['id' => '$ID$']) !!} 	$TEXT$ </label>$END$" description="Generate a Checkbox element (name, value, checked, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""name"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="" defaultValue=""1"" alwaysStopAt="true" />
<variable name="CHECKED" expression="enum("null, ", "true, ")" defaultValue="" alwaysStopAt="true" />
<variable name="ID" expression="NAME" defaultValue="" alwaysStopAt="true" />
<variable name="TEXT" expression="" defaultValue=""Some text here"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::radio" value="<label> 	{!! Form::radio('$NAME$', '$DEFAULT$', $CHECKED$ ['id' => '$ID$']) !!} 	$TEXT$ </label>$END$" description="Generate a Radio element (name, value, checked, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""name"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="" defaultValue=""1"" alwaysStopAt="true" />
<variable name="CHECKED" expression="enum("null, ", "true, ")" defaultValue="" alwaysStopAt="true" />
<variable name="ID" expression="NAME" defaultValue="" alwaysStopAt="true" />
<variable name="TEXT" expression="" defaultValue=""Some text here"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::password" value="{!! Form::password('$NAME$'$OPTION$) !!}$END$" description="Generate a Password Input element (name, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""password"" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::input" value="{!! Form::file('$NAME$'$OPTION$) !!}$END$" description="Generate a File Input element (name, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""filename"" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::select" value="{!! Form::select('$NAME$', $LIST$ $DEFAULT$ $OPTION$) !!}$END$" description="Generate a Drop-down list (name, array of options, default, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""name"" alwaysStopAt="true" />
<variable name="LIST" expression="" defaultValue=""$array"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="" defaultValue="", null"" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::selectRange" value="{!! Form::selectRange('$NAME$', $FROM$, $TO$ $DEFAULT$ $OPTION$) !!}$END$" description="Generate a Drop-down list with Range (name, from, to, default, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""name"" alwaysStopAt="true" />
<variable name="FROM" expression="" defaultValue=""1"" alwaysStopAt="true" />
<variable name="TO" expression="" defaultValue=""20"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="" defaultValue="", null"" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::selectMonth" value="{!! Form::selectMonth('$NAME$' $DEFAULT$ $OPTION$) !!}$END$" description="Generate a Drop-down list with Months (name, default, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""Month"" alwaysStopAt="true" />
<variable name="DEFAULT" expression="" defaultValue="", null"" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::submit" value="{!! Form::submit('$NAME$'$OPTION$) !!}$END$" description="Generate a Submit button (value, attributes)" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""Submit"" alwaysStopAt="true" />
<variable name="OPTION" expression="" defaultValue="", ['class' => 'form-control']"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="Form::macro" value="Form::macro('$NAME$', function() { $END$ });" description="Generate a Form Macro" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue=""macro"" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="PHP" value="true" />
</context>
</template>
</templateSet>