Advanced usage: example with Doctrine

That's not really an advanced topic, but the sample will be a bit hard to read (as it takes many files), so let's say it targets more experienced Symfony users.

In this demo, we're displaying a MyArray of MyElements, both persisted into the database. The MyArray entity only have an id and a name, and MyElement has id, MyArray's id and a value. This is quite the same as we seen in all demos, but persisted.

Array name:
Add an element...

Existing arrays:
Name Open Delete
xv Open Delete
_ Open Delete
__________________________________________ Open Delete
_________AAAAAAAAAAAAA_______ Open Delete
__EDLP_7-0_ Open Delete
_a_ Open Delete
_a_firra Open Delete
_Greeting Open Delete
_Greeting, :D happy 2018 Open Delete
---#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
---#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
---#i27992875ec4286a24e569b1e015b0473 Open Delete
---#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
---#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
---#ie025efbbb0738ed01a63b326c174233e Open Delete
? Open Delete
' Open Delete
(orphée) Open Delete
(SELECT (CASE WHEN (3158=3158) THEN 'kjh' ELSE (SELECT 1437 UNION SELECT 2166) END)) Open Delete
(SELECT (CASE WHEN (4626=9556) THEN 'kjh' ELSE (SELECT 9556 UNION SELECT 9237) END)) Open Delete
(SELECT (CASE WHEN (5797=5797) THEN 'kjh' ELSE (SELECT 4517 UNION SELECT 5846) END)) Open Delete
(SELECT (CASE WHEN (6190=5092) THEN 'kjh' ELSE (SELECT 5092 UNION SELECT 3869) END)) Open Delete
@12 Open Delete
&&&&&&&&&&& Open Delete
#1 Open Delete
#7233333 Open Delete
#72uuuuokokok Open Delete
#91 Open Delete
%231 Open Delete
%237233333 Open Delete
%2372uuuu Open Delete
%2391 Open Delete
%25237233333 Open Delete
%25237233333#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
%25237233333#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
%25237233333#i21ef661e2506d5d0e513dce166c17d49 Open Delete
%25237233333#i5784b3886628c4362594ffa43547edb4 Open Delete
%25237233333#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
%25237233333#ie025efbbb0738ed01a63b326c174233e Open Delete
%252372uuuu Open Delete
%252372uuuu#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
%252372uuuu#i27992875ec4286a24e569b1e015b0473 Open Delete
%252372uuuu#i5784b3886628c4362594ffa43547edb4 Open Delete
%252372uuuu#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
%252372uuuu#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
%252372uuuu#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
%252372uuuu#ie025efbbb0738ed01a63b326c174233e Open Delete
%253F#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
%253F#i21ef661e2506d5d0e513dce166c17d49 Open Delete
%253F#i27992875ec4286a24e569b1e015b0473 Open Delete
%253F#i5784b3886628c4362594ffa43547edb4 Open Delete
%3Csdsads Open Delete
%3F Open Delete
%C3%B1lkjlkj Open Delete
<?php echo ' i don't like it ' Open Delete
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<LETTRE GREC>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Open Delete
<script>alert('test')</script> Open Delete
<script>alert('test')</script>%n%n%n%n%n%n Open Delete
<script>alert('test')</script>%n%n%n%n%n%n<script>alert('test')</script>%n%n%n%n%n%n<script>alert('test')</script>%n%n%n%n%n%n<script>alert('test')</script>%n%n%n%n%n%n<script>alert('test')</script>%n%n%n%n%n%n<script>alert('test')</script>%n%n%n%n%n%n<sc Open Delete
~~~ Open Delete
00000 Open Delete
000tom Open Delete
01233 Open Delete
1 Open Delete
10 Open Delete
1000-1 Open Delete
11#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
11#i21ef661e2506d5d0e513dce166c17d49 Open Delete
11#i27992875ec4286a24e569b1e015b0473 Open Delete
11#i5784b3886628c4362594ffa43547edb4 Open Delete
11#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
11#ie025efbbb0738ed01a63b326c174233e Open Delete
1111#i21ef661e2506d5d0e513dce166c17d49 Open Delete
1111#i27992875ec4286a24e569b1e015b0473 Open Delete
1111#i5784b3886628c4362594ffa43547edb4 Open Delete
1111#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
1111#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
1111#ie025efbbb0738ed01a63b326c174233e Open Delete
11111111111111 Open Delete
1111111111111111111111111111111111 Open Delete
1111111111111111111111111111111111#i27992875ec4286a24e569b1e015b0473 Open Delete
1111111111111111111111111111111111#i5784b3886628c4362594ffa43547edb4 Open Delete
1111111111111111111111111111111111#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
1111111111111111111111111111111111#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
11111111aaa Open Delete
1111Yapi Open Delete
121113 Open Delete
121113aaaaa Open Delete
122 Open Delete
1231 Open Delete
123333 Open Delete
123blue Open Delete
1241 Open Delete
15 Open Delete
1525 Open Delete
1aa Open Delete
1Alpha Open Delete
2222 example Open Delete
2222%20example Open Delete
2222%2520example Open Delete
222222 Open Delete
2232323 Open Delete
32jnni Open Delete
456 Open Delete
5454 Open Delete
7 Open Delete
78 Open Delete
8 Open Delete
86787 Open Delete
88 Open Delete
8888 Open Delete
890 Open Delete
8chan.org Open Delete
999 Open Delete
☘ Cela fonctionne ☘ Open Delete
a woop woop Open Delete
a2 Open Delete
ñlkjlkj Open Delete
ñsfkjaldsa Open Delete
aaa Open Delete
aaaa Open Delete
aaaaaaaaaaaaaa22 Open Delete
AAAAAEER Open Delete
тест Open Delete
aaamine22222 Open Delete
ad Open Delete
adasdada Open Delete
adfadf Open Delete
adfadf'A=0 Open Delete
Alpha Open Delete
alsi Open Delete
any Open Delete
Array Open Delete
array new Open Delete
array1 Open Delete
arrayGilmry Open Delete
asaasexample Open Delete
asas Open Delete
asd asd asd Open Delete
asda Open Delete
asdaexample Open Delete
asdas Open Delete
asdasd Open Delete
asdasd#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
asdasd#i5784b3886628c4362594ffa43547edb4 Open Delete
asdasd#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
asdasd#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
asdasd#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
asdasdadasd Open Delete
asdasdadasd#i21ef661e2506d5d0e513dce166c17d49 Open Delete
asdasdadasd#i27992875ec4286a24e569b1e015b0473 Open Delete
asdasdadasd#i5784b3886628c4362594ffa43547edb4 Open Delete
asdasdadasd#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
asdasddadsd Open Delete
asdfasdfasd Open Delete
asdfasdfasd8888 Open Delete
asdfg Open Delete
asds Open Delete
assa Open Delete
AU Open Delete
az Open Delete
azazaz Open Delete
Aze Open Delete
azerty Open Delete
azerty'A=0 Open Delete
b Open Delete
bcvbcvb Open Delete
bjfhj Open Delete
bjfhj#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
bjfhj#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
bjfhj#i21ef661e2506d5d0e513dce166c17d49 Open Delete
bjfhj#i27992875ec4286a24e569b1e015b0473 Open Delete
bjfhj#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
bjfhj#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
bjfhj#ie025efbbb0738ed01a63b326c174233e Open Delete
blah#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
blah#i27992875ec4286a24e569b1e015b0473 Open Delete
blah#i5784b3886628c4362594ffa43547edb4 Open Delete
cccio Open Delete
cela Open Delete
Cela fonctionne Open Delete
Cela fonctionne pas Open Delete
checks Open Delete
Christos Open Delete
cnes Open Delete
colombo Open Delete
crap Open Delete
cups Open Delete
Cuves Open Delete
cx%3Cwc Open Delete
cx<wc Open Delete
cx<wc'A=0 Open Delete
cxcxx Open Delete
D happy 2018 Open Delete
D#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
D#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
D#i21ef661e2506d5d0e513dce166c17d49 Open Delete
D#i27992875ec4286a24e569b1e015b0473 Open Delete
D#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
dada Open Delete
dasf Open Delete
dcdc Open Delete
ddazdaz Open Delete
ddd Open Delete
dddd Open Delete
dddddddddddddddddddddd Open Delete
delete_empty Open Delete
dfa#i21ef661e2506d5d0e513dce166c17d49 Open Delete
dfa#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
dfa#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
dfa#ie025efbbb0738ed01a63b326c174233e Open Delete
dfdsf Open Delete
dfdt Open Delete
dfg Open Delete
dfgdfg Open Delete
dfty Open Delete
dftydfty Open Delete
dfzre Open Delete
dgdgdg Open Delete
dgh Open Delete
dghdfgdfgd Open Delete
diego Open Delete
Doom Open Delete
drgd Open Delete
dsadsadd Open Delete
dsd Open Delete
dsf Open Delete
dsfsdfs Open Delete
dsvfdsfg%5D Open Delete
ee Open Delete
eeeeee Open Delete
ejemplo 2 Open Delete
ejemplo 2017-11-23 Open Delete
erwgfuıgj8hlı Open Delete
erwgfuıgj Open Delete
erwgfuıgj8hlı Open Delete
exampldfdfe Open Delete
example Open Delete
example Radu Open Delete
example%20exam Open Delete
example+exam Open Delete
example1 Open Delete
example123 Open Delete
example123#i27992875ec4286a24e569b1e015b0473 Open Delete
example123#ie025efbbb0738ed01a63b326c174233e Open Delete
example3243423 Open Delete
example33333 Open Delete
exampleasfsafa Open Delete
exampleasfsafasf#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
exampleasfsafasf#i27992875ec4286a24e569b1e015b0473 Open Delete
exampleasfsafasf#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
exampleasfsafasf#ie025efbbb0738ed01a63b326c174233e Open Delete
exampleaz Open Delete
exampledsdsdd Open Delete
exampledsdsdda Open Delete
exampledsdsddasds,sad,a,d,as,d,asd,asd Open Delete
exampleeaze Open Delete
exampleeeeeeeeeeeee Open Delete
examplefh Open Delete
examplehfghfhfgfg Open Delete
examplehjkhjk Open Delete
examplemmm Open Delete
examplemmmm Open Delete
examplenhnhd Open Delete
exampleqqqq Open Delete
exampleRW Open Delete
exampleRW2 Open Delete
examplesa;fs;af;sfsf Open Delete
examplesadfasfasdf Open Delete
examplesafsaf Open Delete
examplesafsaf;sfsf Open Delete
examplesafsafsfsf Open Delete
examplesdf Open Delete
exampless Open Delete
exampletest_11 Open Delete
exampletestsf sdf sd sd Open Delete
exampleu Open Delete
exampple Open Delete
examqdqsple Open Delete
Existing arrays: Open Delete
Existing%20arrays: Open Delete
exkiample Open Delete
Fda Open Delete
fdf#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
fdf#i21ef661e2506d5d0e513dce166c17d49 Open Delete
fdf#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
fdg Open Delete
fdgdf Open Delete
fdgfgsdf Open Delete
fdsdf Open Delete
fdsf Open Delete
fdsfds Open Delete
fe Open Delete
ff d Open Delete
fff Open Delete
ffff Open Delete
fgdfg Open Delete
fgfdgdgdf Open Delete
fgjgh Open Delete
firrra Open Delete
frfrf Open Delete
fro Open Delete
Fruits Open Delete
fsgv Open Delete
gdfg Open Delete
gdfg#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
gdfg#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
gdfg#i21ef661e2506d5d0e513dce166c17d49 Open Delete
gdfg#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
gege Open Delete
geht nicht Open Delete
gfdgdf Open Delete
gfgddgfd Open Delete
gg Open Delete
gg'A=0 Open Delete
GGI Open Delete
ghfhgfg Open Delete
ghgtytyt Open Delete
ghj Open Delete
ghjk Open Delete
ghjk#i1097c8b84b58a65ed6ec7b4f0da3ab67 Delete
ghjk#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
ghjk#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
ghjk#ie025efbbb0738ed01a63b326c174233e Open Delete
Group B Open Delete
Group%2BC#i21ef661e2506d5d0e513dce166c17d49 Open Delete
Group%2BC#i27992875ec4286a24e569b1e015b0473 Open Delete
Group%2BC#i5784b3886628c4362594ffa43547edb4 Open Delete
Group+C Open Delete
gufc fucvuy Open Delete
gufc fucvuy dd Open Delete
hahah Open Delete
hb Open Delete
hbhbhb Open Delete
hello Open Delete
Hello world Open Delete
Hello%20World%20! Open Delete
HEYY%20:D Open Delete
HEYY%2520:D#i5784b3886628c4362594ffa43547edb4 Open Delete
HEYY%2520:D#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
HEYY%2520:D#ie025efbbb0738ed01a63b326c174233e Open Delete
hgfh Open Delete
hgjgjh Open Delete
hgkjh Open Delete
hh Open Delete
hhmm Open Delete
hi bitches Open Delete
hoho Open Delete
hrthrh Open Delete
i Open Delete
iooi Open Delete
ismail Open Delete
itemList Open Delete
itemList2 Open Delete
iuy Open Delete
j Open Delete
jhj Open Delete
jkjk Open Delete
jose Open Delete
kappa Open Delete
khj Open Delete
khj#i27992875ec4286a24e569b1e015b0473 Open Delete
khj#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
kiki Open Delete
kjh Open Delete
kjh AND 1091=5857 Open Delete
kjh AND 2171=2112-- yWqk Open Delete
kjh AND 2935=5884-- JseU Open Delete
kjh AND 7390 IN (SELECT (CHAR(113)+CHAR(106)+CHAR(106)+CHAR(118)+CHAR(113)+(SELECT (CASE WHEN (7390=7390) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(113)+CHAR(122)+CHAR(120)+CHAR(113))) Open Delete
kjh AND 7390 IN (SELECT (CHAR(113)+CHAR(106)+CHAR(106)+CHAR(118)+CHAR(113)+(SELECT (CASE WHEN (7390=7390) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(113)+CHAR(122)+CHAR(120)+CHAR(113)))-- iTwS Open Delete
kjh AND 8611=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(106)||CHR(106)||CHR(118)||CHR(113)||(SELECT (CASE WHEN (8611=8611) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(113)||CHR(122)||CHR(120)||CHR(113)||CHR(62))) FROM DUAL) Open Delete
kjh AND 8864=CAST((CHR(113)||CHR(122)||CHR(107)||CHR(120)||CHR(113))||(SELECT (CASE WHEN (8864=8864) THEN 1 ELSE 0 END))::text||(CHR(113)||CHR(106)||CHR(107)||CHR(122)||CHR(113)) AS NUMERIC)-- XVww Open Delete
kjh AND 9650=6116 Open Delete
kjh AND 9667 IN (SELECT (CHAR(113)+CHAR(122)+CHAR(107)+CHAR(120)+CHAR(113)+(SELECT (CASE WHEN (9667=9667) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(106)+CHAR(107)+CHAR(122)+CHAR(113))) Open Delete
kjh ORDER BY 1-- MwCf Open Delete
kjh ORDER BY 1-- pvJb Open Delete
kjh' AND 1967=4628 AND 'WfvI'='WfvI Open Delete
kjh' AND 2060=2060 AND 'JKZh'='JKZh Open Delete
kjh' AND 4678=8698 AND 'uMbv'='uMbv Open Delete
kjh' AND 5727=1498 AND 'nmqQ'='nmqQ Open Delete
kjh' AND 7954=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(122)||CHR(107)||CHR(120)||CHR(113)||(SELECT (CASE WHEN (7954=7954) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(106)||CHR(107)||CHR(122)||CHR(113)||CHR(62))) FROM DUAL) AND 'HwZm'='HwZm Open Delete
kjh' AND EXTRACTVALUE(5914,CONCAT(0x5c,0x716a6a7671,(SELECT (ELT(5914=5914,1))),0x71717a7871)) AND 'GCxm'='GCxm Open Delete
kjh') AND 1448=9534 AND ('TzXm'='TzXm Open Delete
kjh') AND 2750=5826 AND ('NRcI'='NRcI Open Delete
kjh') AND 3055=4968 AND ('igun'='igun Open Delete
kjh') AND 6019=4131 AND ('fWIB'='fWIB Open Delete
kjh') AND 7954=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(122)||CHR(107)||CHR(120)||CHR(113)||(SELECT (CASE WHEN (7954=7954) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(106)||CHR(107)||CHR(122)||CHR(113)||CHR(62))) FROM DUAL) AND ('cHjZ'='cHjZ Open Delete
kjh') AND 9667 IN (SELECT (CHAR(113)+CHAR(122)+CHAR(107)+CHAR(120)+CHAR(113)+(SELECT (CASE WHEN (9667=9667) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(106)+CHAR(107)+CHAR(122)+CHAR(113))) AND ('ixOS'='ixOS Open Delete
kjh') AND EXTRACTVALUE(7241,CONCAT(0x5c,0x717a6b7871,(SELECT (ELT(7241=7241,1))),0x716a6b7a71)) AND ('oZSA'='oZSA Open Delete
kjh') ORDER BY 1-- IuaH Open Delete
kjh') ORDER BY 1-- osYG Open Delete
kjh) AND 1607=1768 AND (8263=8263 Open Delete
kjh) AND 3185=2112 AND (3791=3791 Open Delete
kjh) AND 3637=2334 AND (3292=3292 Open Delete
kjh) AND 7390 IN (SELECT (CHAR(113)+CHAR(106)+CHAR(106)+CHAR(118)+CHAR(113)+(SELECT (CASE WHEN (7390=7390) THEN CHAR(49) ELSE CHAR(48) END))+CHAR(113)+CHAR(113)+CHAR(122)+CHAR(120)+CHAR(113))) AND (2379=2379 Open Delete
kjh) AND 7426=7426 AND (3850=3850 Open Delete
kjh) AND 7954=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(122)||CHR(107)||CHR(120)||CHR(113)||(SELECT (CASE WHEN (7954=7954) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(106)||CHR(107)||CHR(122)||CHR(113)||CHR(62))) FROM DUAL) AND (2635=2635 Open Delete
kjh) AND 8611=(SELECT UPPER(XMLType(CHR(60)||CHR(58)||CHR(113)||CHR(106)||CHR(106)||CHR(118)||CHR(113)||(SELECT (CASE WHEN (8611=8611) THEN 1 ELSE 0 END) FROM DUAL)||CHR(113)||CHR(113)||CHR(122)||CHR(120)||CHR(113)||CHR(62))) FROM DUAL) AND (7499=7499 Open Delete
kjh) AND EXTRACTVALUE(7241,CONCAT(0x5c,0x717a6b7871,(SELECT (ELT(7241=7241,1))),0x716a6b7a71)) AND (6110=6110 Open Delete
kjh) ORDER BY 1-- Vwqu Open Delete
kjkk Open Delete
kk Open Delete
kkik Open Delete
kkk#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
kkk#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
kkk#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
kkk#ie025efbbb0738ed01a63b326c174233e Open Delete
kljlk Open Delete
klk Open Delete
klklklkl Open Delete
lj Open Delete
lkj Open Delete
lkjlkj Open Delete
llllllllllllllll Open Delete
lol Open Delete
Lorenz du Open Delete
Lorenz du stinker Open Delete
m Open Delete
mardi Open Delete
miTest Open Delete
mkmkmk Open Delete
mm Open Delete
mmm Open Delete
moj Open Delete
mon tableau Open Delete
mon%20exemple Open Delete
mon%20putain%20de%20tableau Open Delete
mp Open Delete
Mumbojumbo Open Delete
mytest Open Delete
n Open Delete
тест Open Delete
New Array Open Delete
New%20Array Open Delete
new%20test Open Delete
ñlkjlkj Open Delete
nmn#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
nmn#i21ef661e2506d5d0e513dce166c17d49 Open Delete
nmn#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
nnnnn Open Delete
Nouveau Open Delete
ñsfkjaldsa Open Delete
Numeros de prueba Open Delete
o%C4%B1 Open Delete
oı Open Delete
oezjfez Open Delete
oij Open Delete
ok Open Delete
ordersCollection Open Delete
Ouiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii Open Delete
pablo Open Delete
pepiii Open Delete
peppo Open Delete
perses Open Delete
perses#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
perses#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
po Open Delete
polo Open Delete
pornhub.com Open Delete
pp Open Delete
pppppii Open Delete
pppppii#i27992875ec4286a24e569b1e015b0473 Open Delete
pppppii#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
pppppii#ie025efbbb0738ed01a63b326c174233e Open Delete
pppppp Open Delete
prabu Open Delete
project%201 Open Delete
project+1 Open Delete
punto 2 Open Delete
qqq Open Delete
qsdfqsdf Open Delete
quantite --1 Open Delete
quantite%20--1 Open Delete
question2 Open Delete
qweqw Open Delete
qwerqwerqw Open Delete
qwert Open Delete
qwery2 Open Delete
r Open Delete
rar Open Delete
referees Open Delete
resr Open Delete
RET Open Delete
rewq Open Delete
rfermkferkmfe Open Delete
rrr Open Delete
rrrr Open Delete
rrrr#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
rrrr#i21ef661e2506d5d0e513dce166c17d49 Open Delete
rrrr#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
rtr Open Delete
rtyr Open Delete
RV Open Delete
ryhre Open Delete
sa Open Delete
saassa Open Delete
sad Open Delete
sad.asdasd.sdsad Open Delete
salut les gens Open Delete
samples Open Delete
sd Open Delete
sdasdafs Open Delete
sdczsdzsd Open Delete
sdfsdf Open Delete
sdfsdfsd Open Delete
sdg Open Delete
sdsd'A=0 Open Delete
seeme#i1dcd1cbb0d8eeb1fd3a32dc2aa9c8013 Open Delete
seeme#i5784b3886628c4362594ffa43547edb4 Open Delete
seeme#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
seeme#ie025efbbb0738ed01a63b326c174233e Open Delete
seqtest Open Delete
sf Open Delete
sfd Open Delete
sfdf Open Delete
sfsa Open Delete
sfsdfsd Open Delete
sgdfs Open Delete
some new array Open Delete
someNewArray Open Delete
someNewArray#i1097c8b84b58a65ed6ec7b4f0da3ab67 Open Delete
someNewArray#i21ef661e2506d5d0e513dce166c17d49 Open Delete
someNewArray#i27992875ec4286a24e569b1e015b0473 Open Delete
someNewArray#i5784b3886628c4362594ffa43547edb4 Open Delete
someNewArray#ic3ee8978c60737ab5d058b5a3f6a1b09 Open Delete
sss Open Delete
ssss Open Delete
sssss Open Delete
ssssssssssssss Open Delete
ssssssssssssssssssssssssss Open Delete
Starojitski Open Delete
STASI Open Delete
Stringkey Open Delete
suck my cock fgts Open Delete
Ta mere la grosse choin Open Delete
Ta%2520mere%2520la%2520grosse%2520choin Open Delete
Ta%2520mere%2520la%2520grosse%2520choin#i8c18088ea4d8dd4d6e5e986bceed35da Open Delete
tableau cellule unique Open Delete
tableau%20cellule%20unique Open Delete
terst Open Delete
tes Open Delete
tesss Open Delete
tesst Open Delete
test Open Delete
TEST912 Open Delete
teste2 Open Delete
Tester Open Delete
testsetse Open Delete
testtest Open Delete
tesy Open Delete
Teszt Open Delete
tet Open Delete
texte Open Delete
this is an array Open Delete
totototototo Open Delete
tset Open Delete
tutu Open Delete
tyrtyrtrhgfhgfhg Open Delete
tzzttz Open Delete
ui Open Delete
ukh Open Delete
uu Open Delete
vcvcvcvcvv Open Delete
vdsvd Open Delete
Volta Dilma Fo Open Delete
Volta Dilma Fora% Open Delete
Volta%2 Open Delete
Volta%20Dilma%20Fo Open Delete
Volta%20Dilma%20Fora%20Temer Open Delete
Volta%2520Dilma%2520Fora%2520Temer Open Delete
Volta%2520Dilma%2520Fora%2520Temer#i21ef661e2506d5d0e513dce16 Open Delete
Volta%2520Dilma%2520Fora%2520Temer#i27992875ec4286a24e569b1e015b0473 Open Delete
Volta%2520Dilma%2520Fora%2520Temer#ibcac9f4c58199eeaa7ba5c7750b8434b Open Delete
Volta%2520Dilma%2520Fora%2520Temer#ie025efbbb0738ed01a63b326c174233e Open Delete
VRE Open Delete
vvvvvvvvvvvvvvv Open Delete
vxvxcvxcv Open Delete
w Open Delete
wasda Open Delete
why doctrine Open Delete
why%20doctrine%20on%20delete%20not%20work Open Delete
Woop wooop Open Delete
wqewqeqwewewq Open Delete
wsh yannito Open Delete
ww Open Delete
www Open Delete
wxc%3Cwxc Open Delete
xcxcxcx Open Delete
xd Open Delete
xxx Open Delete
xzcvxcv Open Delete
yfcx Open Delete
yoyoy Open Delete
yy Open Delete
yytutyutyu Open Delete
zDSfsdf Open Delete
zzz Open Delete
zzzz1 Open Delete
☘ Cela fonctionne ☘ Open Delete
File: Base/BaseController.php
<?php

namespace Fuz\AppBundle\Base;

use Fuz\AppBundle\Entity\Value;
use Fuz\AppBundle\Form\ValueType;
use Fuz\QuickStartBundle\Base\BaseController as QuickStartBase;
use Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\HttpFoundation\Request;

class BaseController extends QuickStartBase
{
    protected function createContextSample(Request $request, $name = 'form', $values = ['a', 'b', 'c'])
    {
        $data = ['values' => $values];

        $form = $this
           ->get('form.factory')
           ->createNamedBuilder($name, Type\FormType::class, $data)
           ->add('values', Type\CollectionType::class, [
               'entry_type'    => Type\TextType::class,
               'label'         => 'Add, move, remove values and press Submit.',
               'entry_options' => [
                   'label' => 'Value',
               ],
               'allow_add'    => true,
               'allow_delete' => true,
               'prototype'    => true,
               'attr'         => [
                   'class' => "{$name}-collection",
               ],
           ])
           ->add('submit', Type\SubmitType::class)
           ->getForm()
        ;

        $form->handleRequest($request);
        if ($form->isValid()) {
            $data = $form->getData();
        }

        return [
            $name         => $form->createView(),
            "{$name}Data" => $data,
        ];
    }

    protected function createAdvancedContextSample(Request $request, $name = 'advancedForm')
    {
        $a = new Value('a');
        $b = new Value('b');
        $c = new Value('c');

        $data = ['values' => [$a, $b, $c]];

        $form = $this
           ->get('form.factory')
           ->createNamedBuilder($name, Type\FormType::class, $data)
           ->add('values', Type\CollectionType::class, [
               'entry_type'   => ValueType::class,
               'label'        => 'Add, move, remove values and press Submit.',
               'allow_add'    => true,
               'allow_delete' => true,
               'prototype'    => true,
               'required'     => false,
               'attr'         => [
                   'class' => "{$name}-collection",
               ],
           ])
           ->add('submit', Type\SubmitType::class)
           ->getForm()
        ;

        $form->handleRequest($request);
        if ($form->isValid()) {
            $data = $form->getData();
        }

        return [
            $name         => $form->createView(),
            "{$name}Data" => $data,
        ];
    }
}
File: Base/BaseController.php
File: Controller/AdvancedController.php
<?php

namespace Fuz\AppBundle\Controller;

use Fuz\AppBundle\Base\BaseController;
use Fuz\AppBundle\Entity\Address;
use Fuz\AppBundle\Entity\Addresses;
use Fuz\AppBundle\Entity\Fancy;
use Fuz\AppBundle\Entity\FancyCollection;
use Fuz\AppBundle\Entity\Value;
use Fuz\AppBundle\Form\AddressesType;
use Fuz\AppBundle\Form\FancyCollectionType;
use Fuz\AppBundle\Form\MyArrayType;
use Fuz\AppBundle\Form\ValueType;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Form\Extension\Core\Type;
use Symfony\Component\HttpFoundation\Request;

/**
 * @Route("/advanced")
 */
class AdvancedController extends BaseController
{
    /**
     * Advanced usage
     *
     * You can reference your form collection in the view, instead of
     * putting a selector in the form type.
     *
     * @Route("/mvcCompliance", name="mvcCompliance")
     * @Template()
     */
    public function mvcComplianceAction(Request $request)
    {
        $data = ['values' => ['a', 'b', 'c']];

        $form = $this
           ->createFormBuilder($data)
           ->add('values', Type\CollectionType::class, [
               'entry_type'    => Type\TextType::class,
               'label'         => 'Add, move, remove values and press Submit.',
               'entry_options' => [
                   'label' => 'Value',
               ],
               'allow_add'    => true,
               'allow_delete' => true,
               'prototype'    => true,
               'required'     => false,
//                   'attr' => array (
//                           'class' => 'my-selector', <--- Not MVC compliant!
//                   ),
           ])
           ->add('submit', Type\SubmitType::class)
           ->getForm()
        ;

        $form->handleRequest($request);
        if ($form->isValid()) {
            $data = $form->getData();
        }

        return [
            'form' => $form->createView(),
            'data' => $data,
        ];
    }

    /**
     * Advanced usage
     *
     * A custom form theme helps define button's layout and positions as and where you want.
     *
     * @Route("/customFormTheme", name="customFormTheme")
     * @Template()
     */
    public function customFormThemeAction(Request $request)
    {
        $data = ['values' => [new Value('a'), new Value('b'), new Value('c')]];

        $form = $this
           ->createFormBuilder($data)
           ->add('values', Type\CollectionType::class, [
               'entry_type'   => ValueType::class,
               'label'        => 'Add, move, remove values and press Submit.',
               'allow_add'    => true,
               'allow_delete' => true,
               'prototype'    => true,
               'required'     => false,
               'attr'         => [
                   'class' => 'collection',
               ],
           ])
           ->add('submit', Type\SubmitType::class)
           ->getForm()
        ;

        $form->handleRequest($request);
        if ($form->isValid()) {
            $data = $form->getData();
        }

        return [
            'form' => $form->createView(),
            'data' => $data,
        ];
    }

    /**
     * Advanced usage
     *
     * Same demo as above, but with the add button located at the bottom of
     * the form instead of close to each field.
     *
     * @Route("/customFormThemeAddBottom", name="customFormThemeAddBottom")
     * @Template()
     */
    public function customFormThemeAddBottomAction(Request $request)
    {
        return $this->customFormThemeAction($request);
    }

    /**
     * Advanced usage
     *
     * Collection of collections are useful on the most dynamic forms, and a good
     * way to test if the plugin is working as expected too.
     *
     * @Route("/collectionOfCollections", name="collectionOfCollections")
     * @Template()
     */
    public function collectionOfCollectionsAction(Request $request)
    {
        $data = [
            'collections' => [
                [new Value('a'), new Value('b'), new Value('c')],
                [new Value('d'), new Value('e'), new Value('f')],
                [new Value('g'), new Value('h'), new Value('i')],
            ],
        ];

        $form = $this
           ->get('form.factory')
           ->createNamedBuilder('form', Type\FormType::class, $data)
           ->add('collections', Type\CollectionType::class, [
               'entry_type'    => Type\CollectionType::class,
               'label'         => 'Add, move, remove collections',
               'entry_options' => [
                   'entry_type'    => ValueType::class,
                   'label'         => 'Add, move, remove values',
                   'entry_options' => [
                       'label' => 'Value',
                   ],
                   'allow_add'      => true,
                   'allow_delete'   => true,
                   'prototype'      => true,
                   'prototype_name' => '__children_name__',
                   'attr'           => [
                       'class' => 'child-collection',
                   ],
               ],
               'allow_add'      => true,
               'allow_delete'   => true,
               'prototype'      => true,
               'prototype_name' => '__parent_name__',
               'attr'           => [
                   'class' => 'parent-collection',
               ],
           ])
           ->add('submit', Type\SubmitType::class)
           ->getForm()
        ;

        $form->handleRequest($request);
        if ($form->isValid()) {
            $data = $form->getData();
        }

        return [
            'form' => $form->createView(),
            'data' => $data,
        ];
    }

    /**
     * Advanced usage
     *
     * Looks like there are weird behaviours with Doctrine:
     * https://github.com/ninsuo/symfony-collection/issues/7
     * Let's test that live!
     *
     * ... hmm, doesn't look bad anyway
     *
     * @Route(
     *      "/usageWithDoctrine/{name}",
     *      name = "usageWithDoctrine",
     *      defaults = {
     *          "name" = "example"
     *      }
     * )
     * @Template()
     */
    public function usageWithDoctrineAction(Request $request, $name)
    {
        $repo = $this->getDoctrine()->getRepository('FuzAppBundle:MyArray');

        $data = $repo->findOneByName($name);
        if (is_null($data)) {
            $data = $repo->create($name);
        }

        $form = $this->createForm(MyArrayType::class, $data);
        $form->handleRequest($request);

        $form->get('save')->isClicked() && $form->isValid() && $repo->save($data);

        return [
            'names' => $repo->getArrayNames(),
            'form'  => $form->createView(),
            'data'  => $data,
        ];
    }

    /**
     * Related to usageWithDoctrine demo
     *
     * @Route(
     *      "/usageWithDoctrineDelete/{name}",
     *      name = "usageWithDoctrineDelete"
     * )
     */
    public function usageWithDoctrineDeleteAction(Request $request, $name)
    {
        $repo = $this->getDoctrine()->getRepository('FuzAppBundle:MyArray');
        if (!is_null($data = $repo->findOneByName($name))) {
            $repo->delete($data);
        }

        return $this->forward('FuzAppBundle:Advanced:usageWithDoctrine', [
            'name' => 'example',
        ]);
    }

    /**
     * A form having a theme and containing several fields
     *
     * @Route(
     *      "/formHavingSeveralFields",
     *      name = "formHavingSeveralFields"
     * )
     * @Template()
     */
    public function formHavingSeveralFieldsAction(Request $request)
    {
        $address = new Address();
        $address->setName('Mickael Steller');
        $address->setCompany('fuz.org');
        $address->setStreet('41 rue de la Paix');
        $address->setPostalcode('75002');
        $address->setCity('Paris');
        $address->setCountry('France');

        $addresses = new Addresses();
        $addresses->getAddresses()->add($address);

        $form = $this->createForm(AddressesType::class, $addresses);
        if ($request->isMethod('POST')) {
            $form->handleRequest($request);
        }

        return [
            'form' => $form->createView(),
            'data' => $addresses,
        ];
    }

    /**
     * Another example of form theme
     *
     * @Route(
     *      "/fancyFormTheme",
     *      name = "fancyFormTheme"
     * )
     * @Template()
     */
    public function fancyFormThemeAction(Request $request)
    {
        $fancyCollection = new FancyCollection();

        for ($i = 0; $i < 3; $i++) {
            $fancy = new Fancy();
            $fancyCollection->getFancyCollection()->add($fancy);
        }

        $form = $this->createForm(FancyCollectionType::class, $fancyCollection);

        $form->handleRequest($request);
        if ($form->isValid()) {
            $data = $form->getData();
        }

        return [
            'form' => $form->createView(),
            'data' => $fancyCollection,
        ];
    }
}
File: Controller/AdvancedController.php
File: Entity/MyArray.php
<?php

namespace Fuz\AppBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
 * MyArray
 *
 * @ORM\Table(
 *      name="my_array",
 *      uniqueConstraints={@ORM\UniqueConstraint(name="name_idx", columns={"name"})}
 * )
 * @ORM\Entity(repositoryClass="Fuz\AppBundle\Repository\MyArrayRepository")
 */
class MyArray
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    protected $name;

    /**
     * @var ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="MyElement", mappedBy="array", cascade={"all"}, orphanRemoval=true)
     */
    protected $elements;

    public function __construct()
    {
        $this->elements = new ArrayCollection();
    }

    public function getId()
    {
        return $this->id;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    public function getElements()
    {
        return $this->elements;
    }
}
File: Entity/MyArray.php
File: Entity/MyElement.php
<?php

namespace Fuz\AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * MyElement
 *
 * @ORM\Table(name="my_element"),
 * @ORM\Entity
 */
class MyElement
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var MyArray
     *
     * @ORM\ManyToOne(targetEntity="MyArray", inversedBy="elements")
     * @ORM\JoinColumn(name="my_array_id", referencedColumnName="id")
     */
    protected $array;

    /**
     * @var string
     *
     * @ORM\Column(name="value", type="string", length=255)
     */
    protected $value;

    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    public function getId()
    {
        return $this->id;
    }

    public function setArray(MyArray $array)
    {
        $this->array = $array;

        return $this;
    }

    public function getArray()
    {
        return $this->array;
    }

    public function setValue($value)
    {
        $this->value = $value;

        return $this;
    }

    public function getValue()
    {
        return $this->value;
    }
}
File: Entity/MyElement.php
File: Form/MyArrayType.php
<?php

namespace Fuz\AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class MyArrayType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('name', TextType::class, [
                'label' => 'Array name:',
        ]);

        $builder->add('elements', CollectionType::class, [
            'label'        => 'Add an element...',
            'entry_type'   => MyElementType::class,
            'allow_add'    => true,
            'allow_delete' => true,
            'prototype'    => true,
            'required'     => false,
            'by_reference' => true,
            'delete_empty' => true,
            'attr'         => [
                'class' => 'doctrine-sample',
            ],
        ]);

        $builder->add('save', SubmitType::class, [
                'label' => 'Save this array',
        ]);
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => 'Fuz\AppBundle\Entity\MyArray',
        ]);
    }

    public function getBlockPrefix()
    {
        return 'my_array';
    }
}
File: Form/MyArrayType.php
File: Form/MyElementType.php
<?php

namespace Fuz\AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class MyElementType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('value', TextType::class, [
            'required' => false,
        ]);
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'data_class' => 'Fuz\AppBundle\Entity\MyElement',
        ]);
    }

    public function getBlockPrefix()
    {
        return 'my_element';
    }
}
File: Form/MyElementType.php
File: Repository/MyArrayRepository.php
<?php

namespace Fuz\AppBundle\Repository;

use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Doctrine\ORM\EntityRepository;
use Fuz\AppBundle\Entity\MyArray;

/**
 * MyArrayRepository.
 */
class MyArrayRepository extends EntityRepository
{
    public function create($name)
    {
        $data = new MyArray();
        $data->setName($name);
        try {
            $this->_em->persist($data);
            $this->_em->flush();
        } catch (UniqueConstraintViolationException $e) {
            return null;
        }

        return $data;
    }

    public function save(MyArray $data)
    {
        foreach ($data->getElements() as $element) {
            $element->setArray($data);
        }
        try {
            $this->_em->persist($data);
            $this->_em->flush();
        } catch (UniqueConstraintViolationException $e) {
            return null;
        }

        return $data;
    }

    public function getArrayNames()
    {
        $arrays = $this
            ->_em
            ->createQuery("
               SELECT arr.name
               FROM Fuz\AppBundle\Entity\MyArray arr
            ")
            ->execute();
        $names = [];
        foreach ($arrays as $array) {
            $names[] = $array['name'];
        }

        return $names;
    }

    public function delete(MyArray $data)
    {
        foreach ($data->getElements() as $element) {
            $this->_em->remove($element);
        }
        $this->_em->remove($data);
        $this->_em->flush();
    }
}
File: Repository/MyArrayRepository.php
File: Resources/views/Advanced/doctrine-theme.html.twig

{% block my_element_label %}{% endblock %}
{% block my_element_errors %}{% endblock %}

{% block my_element_widget %}

    <div class="row">
        <div class="col-md-7">
            {{ form_widget(form.value) }}
        </div>
        <div class="col-md-2">
            <a href="#" class="collection-up btn btn-default">Up</a>
            <a href="#" class="collection-down btn btn-default">Down</a>
        </div>
        <div class="col-md-2">
            <a href="#" class="collection-remove btn btn-default">Remove</a>
            <a href="#" class="collection-add btn btn-default">Add</a>
        </div>
        <div class="col-md-1">
            <a href="#" class="collection-duplicate btn btn-default">Duplicate</a>
        </div>
    </div>

{% endblock %}
File: Resources/views/Advanced/doctrine-theme.html.twig
File: Resources/views/Advanced/usageWithDoctrine.html.twig
{% extends 'FuzAppBundle::layout.html.twig' %}

{% block extra_js %}
    <script src="{{ asset('js/jquery.collection.js') }}"></script>
{% endblock %}

{% block title %}Advanced usage: example with Doctrine{% endblock %}

{% block body %}

    <h2>{{ block('title') }}</h2>

    <p>
        That's not really an <i>advanced</i> topic, but the sample will be a bit hard to read (as it takes many files),
        so let's say it targets more experienced Symfony users.
    </p>

    <p>
        In this demo, we're displaying a MyArray of MyElements, both persisted into the database. The MyArray entity
        only have an id and a name, and MyElement has id, MyArray's id and a value. This is quite the same as we seen
        in all demos, but persisted.
    </p>

    <div class="text-center">
        <input type="button" id="new" class="btn btn-default" value="Create new array"/>
    </div>

    {%
        form_theme form
            'jquery.collection.html.twig'
            'FuzAppBundle:Advanced:doctrine-theme.html.twig'
    %}
    {{ form(form) }}

    <hr/>

    {% if names|length %}
        Existing arrays:
        <table class="table">
            <thead>
                <th>Name</th>
                <th>Open</th>
                <th>Delete</th>
            </thead>
            <tbody>
                {% for name in names %}
                    <tr>
                        <td>{{ name }}</td>
                        <td>
                            {% if data.name != name %}<a href="{{ path('usageWithDoctrine', {'name': name}) }}">Open</a>{% endif %}
                        </td>
                        <td><a href="{{ path('usageWithDoctrineDelete', {'name': name}) }}">Delete</a></td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    {% endif %}

    {{
        tabs([
            'Base/BaseController.php',
            'Controller/AdvancedController.php',
            'Resources/views/Advanced/usageWithDoctrine.html.twig',
            'Resources/views/Advanced/doctrine-theme.html.twig',
            'Entity/MyArray.php',
            'Form/MyArrayType.php',
            'Entity/MyElement.php',
            'Form/MyElementType.php',
            'Repository/MyArrayRepository.php',
        ])
    }}

{% endblock %}

{% block script %}

    <script type="text/javascript">

        // only useful for the "new" button...
        $('#new').on('click', function() {
           var name = prompt("Which name would you like to use?");
           if (name) {
               var uri = '{{ path('usageWithDoctrine', {'name': 'a'}) }}';
               document.location = uri.substr(0, uri.length - 1) + encodeURIComponent(name);
           }
        });

        $('.doctrine-sample').collection();

    </script>

{% endblock %}
File: Resources/views/Advanced/usageWithDoctrine.html.twig