-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsymfony.xml
170 lines (170 loc) · 10.2 KB
/
symfony.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
<templateSet group="symfony">
<template name="formincontroller" value="$form = $this->createForm($CLASSNAME$::class); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { // todo - do some work, like saving stuff $this->addFlash('success', '$SUCCESSMESSAGE$'); return $this->redirectToRoute('$ROUTENAME$', []); }" description="Adds controller form-handling code" toReformat="true" toShortenFQNames="true">
<variable name="CLASSNAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="SUCCESSMESSAGE" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ROUTENAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="formrow" value="{{ form_row(form.$FIELD$) }}" description="" toReformat="true" toShortenFQNames="true">
<variable name="FIELD" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
<template name="formrowfull" value="<div class="form-control"> {{ form_label(form.$FIELD$) }} {{ form_widget(form.$FIELD$) }} {{ form_errors(form.$FIELD$) }} </div>" description="Renders widget/label/errors" toReformat="true" toShortenFQNames="true">
<variable name="FIELD" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
<template name="findrepo" value="$this->getDoctrine() ->getRepository('$REPO$')->$METHOD$($ARG$);" description="Queries from a doctrine repository in a controller" toReformat="true" toShortenFQNames="true">
<variable name="REPO" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="METHOD" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ARG" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="rendertwig" value="return $this->render('$TEMPLATE$');$END$ " description="Renders a Twig template from a controller" toReformat="true" toShortenFQNames="true">
<variable name="TEMPLATE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="404unless" value="if ($CONDITION$) { throw $this->createNotFoundException($MESSAGE$); }" description="404 if statement for your controller" toReformat="true" toShortenFQNames="true">
<variable name="CONDITION" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="MESSAGE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="include" value="{{ include('$TEMPLATE$') }}" description="" toReformat="true" toShortenFQNames="true">
<variable name="TEMPLATE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
<template name="path" value="{{ path('$ROUTE$', { $END$ }) }}" description="" toReformat="true" toShortenFQNames="true">
<variable name="ROUTE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
</context>
</template>
<template name="route" value="@Route("/$PATH$", name="$NAME$")" description="" toReformat="true" toShortenFQNames="true">
<variable name="PATH" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="snakeCase(PATH)" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP Comment" value="true" />
</context>
</template>
<template name="action" value="/** * @Route("/$NAME$", name="$NAME$") */ public function $NAME$Action() { $END$ }" description="Creates a controller action." toReformat="true" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="service" value="$NAME$: class: $CLASS$ arguments: - '$ARG1$'" description="Creates a YML service" toReformat="true" toShortenFQNames="true">
<variable name="CLASS" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="NAME" expression="snakeCase(CLASS)" defaultValue="service_name" alwaysStopAt="true" />
<variable name="ARG1" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
<template name="tags" value="tags: - { name: $TAGNAME$ }" description="Yaml service tags" toReformat="true" toShortenFQNames="true">
<variable name="TAGNAME" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
<template name="getem" value="$em = $this->getDoctrine()->getManager();" toReformat="false" toShortenFQNames="true">
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="getrepo" value="$em->getRepository('$ENTITY$');" toReformat="false" toShortenFQNames="true">
<variable name="ENTITY" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="doctrinecolumn" value="/** * @ORM\Column(type="$TYPE$") */ private $$$PROPERTYNAME$;" description="Adds a property with @ORM annotations" toReformat="false" toShortenFQNames="true">
<variable name="PROPERTYNAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="TYPE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="asset" value="{{ asset('$PATH$') }}" toReformat="false" toShortenFQNames="true">
<variable name="PATH" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
</context>
</template>
<template name="asseticjs" value="{% javascripts '$PATH$'$END$ %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}" toReformat="false" toShortenFQNames="true">
<variable name="PATH" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
</context>
</template>
<template name="asseticcss" value="{% stylesheets '$PATH$'$END$ filter='cssrewrite' %} <link rel="stylesheet" href="{{ asset_url }}" /> {% endstylesheets %}" toReformat="false" toShortenFQNames="true">
<variable name="PATH" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
</context>
</template>
<template name="yamlroute" value="$NAME$: path: /$PATH$ defaults: { _controller: $CONTROLLER$ }" description="YAML route" toReformat="false" toShortenFQNames="true">
<variable name="NAME" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="PATH" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="CONTROLLER" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
<template name="querybuilder" value=" $em = $this->getDoctrine()->getManager(); $query = $em->createQueryBuilder() ->select(array('prod', 'cat')) ->from("AppBundle:Prodotti", "prod") ->Join('prod.categorie', 'cat') ->where('prod.id = :id') ->setParameter('id', $idProdotto) ->getQuery() ->getResult();" description="Query objects in repositories using query builder" toReformat="true" toShortenFQNames="true">
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="trans" value="{% trans %}$MESSAGE${% endtrans %}" description="Allows fast entering of translated messages" toReformat="false" toShortenFQNames="true">
<variable name="MESSAGE" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
<template name="item" value="{{ item.$name$ }}" description="item for twig" toReformat="false" toShortenFQNames="true">
<variable name="name" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="Twig" value="true" />
</context>
</template>
<template name="trans-surround" value="{% trans %}$SELECTION${% endtrans %}$END$" description="translated messages in surround templates" toReformat="false" toShortenFQNames="true">
<context>
<option name="Twig" value="true" />
</context>
</template>
<template name="grassetto-surround" value="<b>$SELECTION$</b>$END$" description="grassetto" toReformat="false" toShortenFQNames="true">
<context>
<option name="HTML" value="true" />
<option name="XML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
<template name="form setDefaults" value="$resolver->setDefaults(array( 'data_class' => 'AppBundle\Entity\Admin\Prodotti' ));" description="form setDefaults" toReformat="false" toShortenFQNames="true">
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="par-surround" value="<p>$SELECTION$</p>$END$" description="paragrafo surround" toReformat="false" toShortenFQNames="true">
<context>
<option name="HTML" value="true" />
<option name="Twig" value="true" />
</context>
</template>
</templateSet>