├── .gitignore
├── .php_cs
├── LICENSE
├── README.md
├── app
├── .htaccess
├── AppCache.php
├── AppKernel.php
├── Resources
│ ├── SensioGeneratorBundle
│ │ └── skeleton
│ │ │ └── crud
│ │ │ └── views
│ │ │ ├── edit.html.twig.twig
│ │ │ ├── index.html.twig.twig
│ │ │ ├── new.html.twig.twig
│ │ │ ├── others
│ │ │ └── record_actions.html.twig.twig
│ │ │ └── show.html.twig.twig
│ ├── TwigBundle
│ │ └── views
│ │ │ └── Exception
│ │ │ ├── error.html.twig
│ │ │ ├── error403.html.twig
│ │ │ ├── error404.html.twig
│ │ │ └── error500.html.twig
│ ├── translations
│ │ ├── messages.en.xlf
│ │ └── messages.fr.xlf
│ └── views
│ │ ├── base.html.twig
│ │ └── default
│ │ └── index.html.twig
├── SymfonyRequirements.php
├── autoload.php
├── check.php
├── config
│ ├── config.yml
│ ├── config_dev.yml
│ ├── config_prod.yml
│ ├── config_test.yml
│ ├── parameters.yml.dist
│ ├── routing.yml
│ ├── routing_dev.yml
│ ├── security.yml
│ └── services.yml
├── console
├── logs
│ └── .gitkeep
└── phpunit.xml.dist
├── composer.json
├── composer.lock
├── src
├── .htaccess
└── Fuz
│ ├── AppBundle
│ ├── Base
│ │ └── BaseController.php
│ ├── Controller
│ │ ├── Advanced
│ │ │ └── FormWithSeveralCollectionsController.php
│ │ ├── AdvancedController.php
│ │ ├── Basic
│ │ │ ├── InATableController.php
│ │ │ ├── PositionFieldController.php
│ │ │ └── SimpleCollectionController.php
│ │ ├── Home
│ │ │ └── HomeController.php
│ │ ├── OptionsController.php
│ │ └── TroubleshootController.php
│ ├── DependencyInjection
│ │ ├── Configuration.php
│ │ └── FuzAppExtension.php
│ ├── Entity
│ │ ├── Address.php
│ │ ├── Addresses.php
│ │ ├── Advanced
│ │ │ └── FormWithSeveralCollections
│ │ │ │ ├── City.php
│ │ │ │ ├── Hobby.php
│ │ │ │ └── Travel.php
│ │ ├── Basic
│ │ │ ├── InATable
│ │ │ │ ├── Discount.php
│ │ │ │ └── DiscountCollection.php
│ │ │ └── PositionField
│ │ │ │ ├── Action.php
│ │ │ │ └── Actions.php
│ │ ├── Fancy.php
│ │ ├── FancyCollection.php
│ │ ├── Home
│ │ │ └── Fruit.php
│ │ ├── MyArray.php
│ │ ├── MyElement.php
│ │ ├── Task.php
│ │ ├── Tasks.php
│ │ └── Value.php
│ ├── Form
│ │ ├── AddressType.php
│ │ ├── AddressesType.php
│ │ ├── Advanced
│ │ │ └── FormWithSeveralCollections
│ │ │ │ ├── CityType.php
│ │ │ │ ├── HobbyType.php
│ │ │ │ └── TravelType.php
│ │ ├── Basic
│ │ │ ├── InATable
│ │ │ │ ├── DiscountCollectionType.php
│ │ │ │ └── DiscountType.php
│ │ │ └── PositionField
│ │ │ │ ├── ActionType.php
│ │ │ │ └── ActionsType.php
│ │ ├── FancyCollectionType.php
│ │ ├── FancyType.php
│ │ ├── Home
│ │ │ └── FruitType.php
│ │ ├── MyArrayType.php
│ │ ├── MyElementType.php
│ │ ├── TaskType.php
│ │ ├── TasksType.php
│ │ └── ValueType.php
│ ├── FuzAppBundle.php
│ ├── Menu
│ │ └── Builder.php
│ ├── Repository
│ │ └── MyArrayRepository.php
│ ├── Resources
│ │ ├── config
│ │ │ └── services.xml
│ │ ├── translations
│ │ │ ├── messages.en.xlf
│ │ │ └── messages.fr.xlf
│ │ └── views
│ │ │ ├── Advanced
│ │ │ ├── FormWithSeveralCollections
│ │ │ │ ├── form-theme.html.twig
│ │ │ │ └── index.html.twig
│ │ │ ├── addresses-theme.html.twig
│ │ │ ├── advanced-theme.html.twig
│ │ │ ├── collectionOfCollections.html.twig
│ │ │ ├── customFormTheme.html.twig
│ │ │ ├── customFormThemeAddBottom.html.twig
│ │ │ ├── doctrine-theme.html.twig
│ │ │ ├── fancy-theme.html.twig
│ │ │ ├── fancyFormTheme.html.twig
│ │ │ ├── formHavingSeveralFields.html.twig
│ │ │ ├── mvcCompliance.html.twig
│ │ │ └── usageWithDoctrine.html.twig
│ │ │ ├── Basic
│ │ │ ├── InATable
│ │ │ │ ├── form-theme.html.twig
│ │ │ │ └── index.html.twig
│ │ │ ├── PositionField
│ │ │ │ ├── formTheme.html.twig
│ │ │ │ └── positionField.html.twig
│ │ │ └── SimpleCollection
│ │ │ │ └── simpleCollection.html.twig
│ │ │ ├── Home
│ │ │ └── Home
│ │ │ │ ├── formThemeNoButtons.html.twig
│ │ │ │ ├── formThemeWithButtons.html.twig
│ │ │ │ └── home.html.twig
│ │ │ ├── Options
│ │ │ ├── addButtonAtTheBottom.html.twig
│ │ │ ├── buttonsCustomLocation.html.twig
│ │ │ ├── customButtons.html.twig
│ │ │ ├── dragAndDrop.html.twig
│ │ │ ├── enableButtons.html.twig
│ │ │ ├── eventCallbacks.html.twig
│ │ │ ├── fadeInFadeOut.html.twig
│ │ │ ├── givenMinimumElements.html.twig
│ │ │ ├── hideMoveUpDown.html.twig
│ │ │ ├── initCallbacks.html.twig
│ │ │ ├── numberCollectionElements.html.twig
│ │ │ ├── options-theme.html.twig
│ │ │ ├── overview.html.twig
│ │ │ └── withoutFormTheme.html.twig
│ │ │ ├── Troubleshoot
│ │ │ ├── customJqueryVersion.html.twig
│ │ │ └── hideFormLabels.html.twig
│ │ │ ├── github.html.twig
│ │ │ ├── layout.html.twig
│ │ │ └── tabs.html.twig
│ └── Twig
│ │ └── Extension
│ │ └── HelperExtension.php
│ └── QuickStartBundle
│ ├── Base
│ ├── BaseCommand.php
│ ├── BaseController.php
│ ├── BaseMenu.php
│ └── BaseService.php
│ ├── Controller
│ └── ReloadController.php
│ ├── DependencyInjection
│ ├── Configuration.php
│ └── FuzQuickStartExtension.php
│ ├── EventListener
│ ├── LastRouteListener.php
│ └── LocaleListener.php
│ ├── FuzQuickStartBundle.php
│ ├── Resources
│ ├── config
│ │ ├── routing.yml
│ │ └── services.yml
│ ├── public
│ │ ├── bootstrap-submenu
│ │ │ ├── css
│ │ │ │ ├── bootstrap-submenu.css
│ │ │ │ ├── bootstrap-submenu.css.map
│ │ │ │ └── bootstrap-submenu.min.css
│ │ │ └── js
│ │ │ │ ├── bootstrap-submenu.js
│ │ │ │ └── bootstrap-submenu.min.js
│ │ ├── css
│ │ │ └── custom.css
│ │ ├── img
│ │ │ ├── countries
│ │ │ │ ├── Afghanistan.png
│ │ │ │ ├── Albania.png
│ │ │ │ ├── Algeria.png
│ │ │ │ ├── American-Samoa.png
│ │ │ │ ├── Andorra.png
│ │ │ │ ├── Angola.png
│ │ │ │ ├── Anguilla.png
│ │ │ │ ├── Antigua-and-Barbuda.png
│ │ │ │ ├── Argentina.png
│ │ │ │ ├── Armenia.png
│ │ │ │ ├── Aruba.png
│ │ │ │ ├── Australia.png
│ │ │ │ ├── Austria.png
│ │ │ │ ├── Azerbaijan.png
│ │ │ │ ├── Bahrain.png
│ │ │ │ ├── Bangladesh.png
│ │ │ │ ├── Barbados.png
│ │ │ │ ├── Belarus.png
│ │ │ │ ├── Belgium.png
│ │ │ │ ├── Belize.png
│ │ │ │ ├── Benin.png
│ │ │ │ ├── Bermuda.png
│ │ │ │ ├── Bhutan.png
│ │ │ │ ├── Bolivia.png
│ │ │ │ ├── Bosnia-and-Herzegovina.png
│ │ │ │ ├── Bostswana.png
│ │ │ │ ├── Bouvet-Island.png
│ │ │ │ ├── Brazil.png
│ │ │ │ ├── British-Indian-Ocean-Territory.png
│ │ │ │ ├── British-Virgin-Islands.png
│ │ │ │ ├── Brunei.png
│ │ │ │ ├── Bulgaria.png
│ │ │ │ ├── Burkina-Faso.png
│ │ │ │ ├── Burma.png
│ │ │ │ ├── Burundi.png
│ │ │ │ ├── Cambodia.png
│ │ │ │ ├── Cameroon.png
│ │ │ │ ├── Canada.png
│ │ │ │ ├── Cape-Verde.png
│ │ │ │ ├── Cayman-Islands.png
│ │ │ │ ├── Central-African-Republic.png
│ │ │ │ ├── Chad.png
│ │ │ │ ├── Chile.png
│ │ │ │ ├── China.png
│ │ │ │ ├── Christmas-Islands.png
│ │ │ │ ├── Cocos-(Keeling)-Islands.png
│ │ │ │ ├── Colombia.png
│ │ │ │ ├── Comoros.png
│ │ │ │ ├── Cook-Islands.png
│ │ │ │ ├── Costa-Rica.png
│ │ │ │ ├── Cote-d'Ivoire.png
│ │ │ │ ├── Croatia.png
│ │ │ │ ├── Cuba.png
│ │ │ │ ├── Cyprus.png
│ │ │ │ ├── Czech-Republic.png
│ │ │ │ ├── Democratic-Republic-of-the-Congo.png
│ │ │ │ ├── Denmark.png
│ │ │ │ ├── Djibouti.png
│ │ │ │ ├── Dominica.png
│ │ │ │ ├── Dominican-Republic.png
│ │ │ │ ├── Ecuador.png
│ │ │ │ ├── Egypt.png
│ │ │ │ ├── El-Salvador.png
│ │ │ │ ├── Equatorial-Guinea.png
│ │ │ │ ├── Eritrea.png
│ │ │ │ ├── Estonia.png
│ │ │ │ ├── Ethiopia.png
│ │ │ │ ├── European-Union.png
│ │ │ │ ├── Falkland-Islands-(Islas-Malvinas).png
│ │ │ │ ├── Faroe-Islands.png
│ │ │ │ ├── Fiji.png
│ │ │ │ ├── Finland.png
│ │ │ │ ├── France.png
│ │ │ │ ├── French-Poynesia.png
│ │ │ │ ├── Gabon.png
│ │ │ │ ├── Georgia.png
│ │ │ │ ├── Germany.png
│ │ │ │ ├── Ghana.png
│ │ │ │ ├── Gibraltar.png
│ │ │ │ ├── Greece.png
│ │ │ │ ├── Greenland.png
│ │ │ │ ├── Grenada.png
│ │ │ │ ├── Guam.png
│ │ │ │ ├── Guatemala.png
│ │ │ │ ├── Guernsey.png
│ │ │ │ ├── Guinea-Blissau.png
│ │ │ │ ├── Guinea.png
│ │ │ │ ├── Guyana.png
│ │ │ │ ├── Haiti.png
│ │ │ │ ├── Holy-See-(Vatican-City).png
│ │ │ │ ├── Honduras.png
│ │ │ │ ├── Hong-Kong.png
│ │ │ │ ├── Hungary.png
│ │ │ │ ├── Iceland.png
│ │ │ │ ├── India.png
│ │ │ │ ├── Indonesia.png
│ │ │ │ ├── Iran.png
│ │ │ │ ├── Iraq.png
│ │ │ │ ├── Ireland.png
│ │ │ │ ├── Isle-of-Man.png
│ │ │ │ ├── Israel.png
│ │ │ │ ├── Italy.png
│ │ │ │ ├── Jamaica.png
│ │ │ │ ├── Japan.png
│ │ │ │ ├── Jordan.png
│ │ │ │ ├── Kazahstan.png
│ │ │ │ ├── Kenya.png
│ │ │ │ ├── Kiribati.png
│ │ │ │ ├── Kosovo.png
│ │ │ │ ├── Kuwait.png
│ │ │ │ ├── Kyrgyzstan.png
│ │ │ │ ├── Laos.png
│ │ │ │ ├── Latvia.png
│ │ │ │ ├── Lebanon.png
│ │ │ │ ├── Lesotho.png
│ │ │ │ ├── Liberia.png
│ │ │ │ ├── Libya.png
│ │ │ │ ├── Liechtenstein.png
│ │ │ │ ├── Lithuania.png
│ │ │ │ ├── Luxembourg.png
│ │ │ │ ├── Macau.png
│ │ │ │ ├── Macedonia.png
│ │ │ │ ├── Madagascar.png
│ │ │ │ ├── Malawi.png
│ │ │ │ ├── Malaysia.png
│ │ │ │ ├── Maldives.png
│ │ │ │ ├── Mali.png
│ │ │ │ ├── Malta.png
│ │ │ │ ├── Marschal-Islands.png
│ │ │ │ ├── Mauritania.png
│ │ │ │ ├── Mauritius.png
│ │ │ │ ├── Mayotte.png
│ │ │ │ ├── Mexico.png
│ │ │ │ ├── Micronesia.png
│ │ │ │ ├── Moldavia.png
│ │ │ │ ├── Monaco.png
│ │ │ │ ├── Mongolia.png
│ │ │ │ ├── Montenegro.png
│ │ │ │ ├── Montserrat.png
│ │ │ │ ├── Morocco.png
│ │ │ │ ├── Mozambique.png
│ │ │ │ ├── Namibia.png
│ │ │ │ ├── Nauru.png
│ │ │ │ ├── Nepal.png
│ │ │ │ ├── Netherlands-Anthilles.png
│ │ │ │ ├── Netherlands.png
│ │ │ │ ├── New-Zealand.png
│ │ │ │ ├── Nicaragua.png
│ │ │ │ ├── Niger.png
│ │ │ │ ├── Nigeria.png
│ │ │ │ ├── Niue.png
│ │ │ │ ├── Norfolk-Island.png
│ │ │ │ ├── North-Korea.png
│ │ │ │ ├── Northern-Mariana-Islands.png
│ │ │ │ ├── Norway.png
│ │ │ │ ├── Oman.png
│ │ │ │ ├── Pakistan.png
│ │ │ │ ├── Palau.png
│ │ │ │ ├── Panama.png
│ │ │ │ ├── Papua-New-Guinea.png
│ │ │ │ ├── Paraguay.png
│ │ │ │ ├── Peru.png
│ │ │ │ ├── Philippines.png
│ │ │ │ ├── Pitcairn-Islands.png
│ │ │ │ ├── Poland.png
│ │ │ │ ├── Portugal.png
│ │ │ │ ├── Puerto-Rico.png
│ │ │ │ ├── Quatar.png
│ │ │ │ ├── Republic-of-the-Congo.png
│ │ │ │ ├── Romania.png
│ │ │ │ ├── Russia.png
│ │ │ │ ├── Rwanda.png
│ │ │ │ ├── Saint-Helena.png
│ │ │ │ ├── Saint-Kitts-and-Nevis.png
│ │ │ │ ├── Saint-Lucia.png
│ │ │ │ ├── Saint-Pierre-and-Miquelon.png
│ │ │ │ ├── Saint-Vincent.png
│ │ │ │ ├── Samoa.png
│ │ │ │ ├── San-Marino.png
│ │ │ │ ├── Sao-Tome-and-Principe.png
│ │ │ │ ├── Saudi-Arabia.png
│ │ │ │ ├── Senegal.png
│ │ │ │ ├── Seychelles.png
│ │ │ │ ├── Sierra-Leone.png
│ │ │ │ ├── Singapore.png
│ │ │ │ ├── Slovakia.png
│ │ │ │ ├── Slovenia.png
│ │ │ │ ├── Solomon-Islands.png
│ │ │ │ ├── Somalia.png
│ │ │ │ ├── South-Africa.png
│ │ │ │ ├── South-Georgia-and-the-South-Sandwitch-Islands.png
│ │ │ │ ├── South-Korea.png
│ │ │ │ ├── Spain.png
│ │ │ │ ├── Sri-Lanka.png
│ │ │ │ ├── Sudan.png
│ │ │ │ ├── Suriname.png
│ │ │ │ ├── Swaziland.png
│ │ │ │ ├── Sweden.png
│ │ │ │ ├── Switzerland.png
│ │ │ │ ├── Syria.png
│ │ │ │ ├── Taiwan.png
│ │ │ │ ├── Tajikistan.png
│ │ │ │ ├── Tanzania.png
│ │ │ │ ├── Thailand.png
│ │ │ │ ├── Tibet.png
│ │ │ │ ├── Timor-Leste.png
│ │ │ │ ├── Togo.png
│ │ │ │ ├── Tonga.png
│ │ │ │ ├── Trinidad-and-Tobago.png
│ │ │ │ ├── Tunisia.png
│ │ │ │ ├── Turkey.png
│ │ │ │ ├── Turkmenistan.png
│ │ │ │ ├── Turks-and-Caicos-Islands.png
│ │ │ │ ├── Tuvalu.png
│ │ │ │ ├── Uganda.png
│ │ │ │ ├── Ukraine.png
│ │ │ │ ├── United-Arab-Emirates.png
│ │ │ │ ├── United-Kingdom.png
│ │ │ │ ├── United-States.png
│ │ │ │ ├── Uruguay.png
│ │ │ │ ├── Uzbekistan.png
│ │ │ │ ├── Vanuatu.png
│ │ │ │ ├── Venezuela.png
│ │ │ │ ├── Vietnam.png
│ │ │ │ ├── Virgin-Islands.png
│ │ │ │ ├── Wallis-and-Futuna.png
│ │ │ │ ├── Yemen.png
│ │ │ │ ├── Zambia.png
│ │ │ │ ├── Zimbabwe.png
│ │ │ │ ├── the-Bahamas.png
│ │ │ │ └── the-Gambia.png
│ │ │ ├── flags
│ │ │ │ ├── black.gif
│ │ │ │ ├── blue.gif
│ │ │ │ ├── green.gif
│ │ │ │ ├── red.gif
│ │ │ │ └── yellow.gif
│ │ │ ├── oauth
│ │ │ │ ├── facebook-small.png
│ │ │ │ ├── facebook.png
│ │ │ │ ├── google-small.png
│ │ │ │ ├── google.png
│ │ │ │ ├── twitter-small.png
│ │ │ │ └── twitter.png
│ │ │ └── wait.gif
│ │ ├── jquery-ui-1.11.2
│ │ │ ├── images
│ │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png
│ │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png
│ │ │ │ ├── ui-bg_flat_10_000000_40x100.png
│ │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png
│ │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png
│ │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png
│ │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png
│ │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png
│ │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png
│ │ │ │ ├── ui-icons_222222_256x240.png
│ │ │ │ ├── ui-icons_228ef1_256x240.png
│ │ │ │ ├── ui-icons_ef8c08_256x240.png
│ │ │ │ ├── ui-icons_ffd27a_256x240.png
│ │ │ │ └── ui-icons_ffffff_256x240.png
│ │ │ ├── index.html
│ │ │ ├── jquery-ui.css
│ │ │ ├── jquery-ui.js
│ │ │ ├── jquery-ui.min.css
│ │ │ ├── jquery-ui.min.js
│ │ │ ├── jquery-ui.structure.css
│ │ │ ├── jquery-ui.structure.min.css
│ │ │ ├── jquery-ui.theme.css
│ │ │ └── jquery-ui.theme.min.css
│ │ └── js
│ │ │ ├── jquery-2.1.1.min.js
│ │ │ └── jquery.domajax.js
│ ├── translations
│ │ ├── messages.en.xlf
│ │ └── messages.fr.xlf
│ └── views
│ │ ├── base-ajax.html.twig
│ │ ├── base.html.twig
│ │ ├── knp_menu.html.twig
│ │ ├── layout.html.twig
│ │ └── macros.html.twig
│ ├── Services
│ └── Routing.php
│ └── Tools
│ └── Math.php
└── web
├── .htaccess
├── app.php
├── app_dev.php
├── apple-touch-icon.png
├── config.php
├── favicon.ico
└── robots.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | nbproject
2 | web/bundles/
3 | web/js
4 | web/css
5 | web/fonts
6 | app/bootstrap.php.cache
7 | app/cache/*
8 | app/config/parameters.yml
9 | app/Resources/views/jquery.collection.html.twig
10 | app/logs/*
11 | !app/cache/.gitkeep
12 | !app/logs/.gitkeep
13 | build/
14 | vendor/
15 | bin/
16 | composer.phar
17 | TODO
18 | .php_cs.cache
19 | .web-server-pid
20 |
21 |
--------------------------------------------------------------------------------
/.php_cs:
--------------------------------------------------------------------------------
1 | files()
7 | ->name('*.php')
8 | ->ignoreDotFiles(true)
9 | ->ignoreVCS(true)
10 | ->in($dir)
11 | ->exclude('cache')
12 | ->exclude('logs')
13 | ->exclude('Resources')
14 | ->exclude('vendor')
15 | ;
16 |
17 | return Symfony\CS\Config\Config::create()
18 | ->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
19 | ->fixers([
20 | // remove a few Symfony rules
21 | '-concat_without_spaces',
22 | '-phpdoc_short_description',
23 | '-pre_increment',
24 | 'align_double_arrow',
25 | 'align_equals',
26 | // add a few Contrib rules
27 | 'concat_with_spaces',
28 | 'newline_after_open_tag',
29 | 'ordered_use',
30 | 'phpdoc_order',
31 | 'short_array_syntax'
32 | ])
33 | ->setUsingCache(true)
34 | ->setUsingLinter(false)
35 | ->finder($finder)
36 | ;
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2014 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Symfony Collection demo website
2 | ========================
3 |
4 | ## See this website [live](http://symfony-collection.fuz.org/)
5 |
6 | ---
7 |
8 | ## Installation
9 |
10 | ```sh
11 | php -r "readfile('https://getcomposer.org/installer');" | php
12 | php composer.phar install
13 | php app/console assetic:dump
14 | php app/console assets:install web --symlink
15 | php app/console server:start
16 | ```
17 |
18 | ## Usage
19 |
20 | All "Basic Usage" samples have their own controllers, form types, views etc. for easier readability.
21 |
22 | If you go to `http://127.0.0.1:8000/basic/positionField`, it means that:
23 |
24 | - Controller is at `AppBundle\Controller\Basic\PositionFieldController.php`
25 | - Entities are at `AppBundle\Entity\Basic\PositionField`
26 | - Form types are at `AppBundle\Form\Basic\PositionField`
27 | - Views and form themes are at `AppBundle\Resources\views\Basic\PositionField`
28 |
29 | Other samples use more generic data because that was quicker to code. If you feel that's not easy enough to understand,
30 | don't hesitate to throw a suggestion or a PR.
31 |
32 | ## License
33 |
34 | - This project is released under the MIT license
35 |
36 | - Fuz logo is © 2013-2042 Alain Tiemblo
37 |
38 |
--------------------------------------------------------------------------------
/app/.htaccess:
--------------------------------------------------------------------------------
1 |
{{ field|capitalize }} | 17 | 18 | {%- if metadata.type in ['datetime'] %} 19 | 20 |{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d H:i:s\') }}{% endif %}' }} | 21 | 22 | {%- elseif metadata.type in ['date'] %} 23 | 24 |{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'Y-m-d\') }}{% endif %}' }} | 25 | 26 | {%- elseif metadata.type in ['time'] %} 27 | 28 |{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|date(\'H:i:s\') }}{% endif %}' }} | 29 | 30 | {%- elseif metadata.type in ['array'] %} 31 | 32 |{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ '|join(\', \') }}{% endif %}' }} | 33 | 34 | {%- elseif metadata.type in ['boolean'] %} 35 | 36 |{{ '{% if ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' %}Yes{% else %}No{% endif %}' }} | 37 | 38 | {%- else %} 39 | 40 |{{ '{{ ' ~ entity_singularized ~ '.' ~ field|replace({'_': ''}) ~ ' }}' }} | 41 | 42 | {%- endif %} 43 | 44 |
---|
20 | < 21 | - 22 | + 23 | > 24 |
25 | {% endblock %} 26 | 27 | {% block AddressesType_widget %} 28 | {{ form_widget(form.addresses) }} 29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /src/Fuz/AppBundle/Resources/views/Advanced/advanced-theme.html.twig: -------------------------------------------------------------------------------- 1 | 2 | {% block ValueType_label %}{% endblock %} 3 | {% block ValueType_errors %}{% endblock %} 4 | 5 | {% block ValueType_widget %} 6 | 7 |
14 | A button is no more than anything containing collection-up
, collection-down
, collection-add
15 | or collection-remove
classes.
16 |
19 | So you can customize buttons by creating a form theme for the form type that will be used inside the collection. 20 |
21 | 22 |
23 | There is only 1 limit: if you're customizing the native collection
theme, you should put collection elements in a div one level
24 | deeper than the collection's root and no more. This is because the plugin uses $('#collection').find('> div');
to find collection's
25 | elements. If you feel that the > div
selector should be customizable in a plugin option, please open an issue on Github.
26 |
Value : {{ value }}
38 | {% endfor %} 39 | 40 | {{ 41 | tabs([ 42 | 'Base/BaseController.php', 43 | 'Controller/AdvancedController.php', 44 | 'Resources/views/Advanced/customFormTheme.html.twig', 45 | 'Resources/views/Advanced/advanced-theme.html.twig', 46 | ]) 47 | }} 48 | 49 | {% endblock %} 50 | 51 | {% block script %} 52 | 53 | 58 | 59 | {% endblock %} 60 | -------------------------------------------------------------------------------- /src/Fuz/AppBundle/Resources/views/Advanced/doctrine-theme.html.twig: -------------------------------------------------------------------------------- 1 | 2 | {% block my_element_label %}{% endblock %} 3 | {% block my_element_errors %}{% endblock %} 4 | 5 | {% block my_element_widget %} 6 | 7 |14 | An other example of theming a collection, where fields are aligned and labels are 15 | disposed above each widget. 16 |
17 | 18 |29 | a = {{ row.a }}, b = {{ row.b }}, c = {{ row.c }} 30 |
31 | {% endfor %} 32 | 33 | {{ 34 | tabs([ 35 | 'Base/BaseController.php', 36 | 'Controller/AdvancedController.php', 37 | 'Resources/views/Advanced/fancy-theme.html.twig', 38 | 'Resources/views/Advanced/fancyFormTheme.html.twig', 39 | 'Entity/FancyCollection.php', 40 | 'Entity/Fancy.php', 41 | 'Form/FancyCollectionType.php', 42 | 'Form/FancyType.php', 43 | ]) 44 | }} 45 | 46 | {% endblock %} 47 | 48 | {% block script %} 49 | 50 | 58 | 59 | {% endblock %} 60 | -------------------------------------------------------------------------------- /src/Fuz/AppBundle/Resources/views/Advanced/formHavingSeveralFields.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'FuzAppBundle::layout.html.twig' %} 2 | 3 | {% block extra_js %} 4 | 5 | {% endblock %} 6 | 7 | {% block title %}Advanced usage: custom theme and several fields{% endblock %} 8 | 9 | {% block body %} 10 | 11 |14 | An example that shows how works theming on a form with more than one field. 15 |
16 | 17 |28 | {{ address.name }} at {{ address.company }}, {{ address.street }}, {{ address.postalcode }} {{ address.city }}, {{ address.country }} 29 |
30 | {% endfor %} 31 | 32 | {{ 33 | tabs([ 34 | 'Base/BaseController.php', 35 | 'Controller/AdvancedController.php', 36 | 'Resources/views/Advanced/addresses-theme.html.twig', 37 | 'Resources/views/Advanced/formHavingSeveralFields.html.twig', 38 | 'Entity/Addresses.php', 39 | 'Entity/Address.php', 40 | 'Form/AddressesType.php', 41 | 'Form/AddressType.php', 42 | ]) 43 | }} 44 | 45 | {% endblock %} 46 | 47 | {% block script %} 48 | 49 | 56 | 57 | {% endblock %} 58 | -------------------------------------------------------------------------------- /src/Fuz/AppBundle/Resources/views/Advanced/mvcCompliance.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'FuzAppBundle::layout.html.twig' %} 2 | 3 | {% block extra_js %} 4 | 5 | {% endblock %} 6 | 7 | {% block title %}Advanced usage: MVC compliance{% endblock %} 8 | 9 | {% block body %} 10 | 11 |14 | In the Basic Usage example, we defined the collection's selector in the form type, but that's not a 15 | good practice, as a selector should take part of the view. 16 |
17 | 18 |
19 | You can reference your form collection using any container, such as a Value : {{ value }} Code used: This is a collection of simple text fields using the plugin with all default options. Value : {{ value }} Code used to initialize the collection: Full Symfony code: Use Note that you can still do more advanced customization (of buttons' position) using form themes. Value : {{ value }} Code used: Use Both options are enabled ( Test it live: - Fade In when adding an element to the collection: - Fade Out when removing an element from the collection: Value : {{ value }} Code used: Use Value : {{ value }} Code used: Use This can be useful if you want to style useless buttons by yourself, instead of Test it live: Value : {{ value }} Code used: Enter a jQuery URL in the field below to include it instead of the current version. You can find jQuery core urls at https://code.jquery.com/jquery/ Value : {{ value }} Code used:{{ '
data-collection="{% verbatim %}{{ form.collectionField.vars.id }}{% endverbatim %}"
.
21 |
22 |
23 | {% form_theme form 'jquery.collection.html.twig' %}
24 | {{ form(form) }}
25 |
26 |
27 |
28 | {% for value in data.values %}
29 |
33 |
34 | {{ block('script') | e }}
36 |
37 | {{
38 | tabs([
39 | 'Base/BaseController.php',
40 | 'Controller/AdvancedController.php',
41 | 'Resources/views/Advanced/mvcCompliance.html.twig',
42 | ])
43 | }}
44 |
45 | {% endblock %}
46 |
47 | {% block script %}
48 |
49 |
50 |
51 |
52 |
55 |
56 | {% endblock %}
57 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/Basic/PositionField/formTheme.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {# remove any label above each element #}
3 | {% block ActionType_label %}
4 | {% endblock %}
5 |
6 | {# better disposition of each elements #}
7 | {% block ActionType_widget %}
8 |
9 | Basic usage
12 |
13 |
19 |
20 | {% for value in data.values %}
21 |
25 |
26 | {{ block('script') | e }}
28 |
29 | {{ block('title') }}
12 |
13 | up
, down
, add
and remove
options to customize your buttons.
21 |
22 | {% for value in formData.values %}
23 |
27 |
28 | {{ block('script') | e }}
30 |
31 | {{
32 | tabs([
33 | 'Controller/OptionsController.php',
34 | 'Base/BaseController.php',
35 | 'Resources/views/Options/customButtons.html.twig',
36 | ])
37 | }}
38 |
39 | {% endblock %}
40 |
41 | {% block script %}
42 |
43 |
53 |
54 | {% endblock %}
55 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/Options/fadeInFadeOut.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'FuzAppBundle::layout.html.twig' %}
2 |
3 | {% block extra_js %}
4 |
5 | {% endblock %}
6 |
7 | {% block title %}JavaScript options : fadeIn / fadeOut animations{% endblock %}
8 |
9 | {% block body %}
10 |
11 | {{ block('title') }}
12 |
13 | fade_in
and fade_out
options to disable fade animation when adding / removing elements of the collection.true
) by default.
27 |
28 | {% for value in formData.values %}
29 |
33 |
34 | {{ block('script') | e }}
36 |
37 | {{
38 | tabs([
39 | 'Base/BaseController.php',
40 | 'Controller/OptionsController.php',
41 | 'Resources/views/Options/fadeInFadeOut.html.twig',
42 | ])
43 | }}
44 |
45 | {% endblock %}
46 |
47 | {% block script %}
48 |
49 |
63 |
64 | {% endblock %}
65 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/Options/givenMinimumElements.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'FuzAppBundle::layout.html.twig' %}
2 |
3 | {% block extra_js %}
4 |
5 | {% endblock %}
6 |
7 | {% block title %}JavaScript options : Initialize your collection with a given minimum number of elements{% endblock %}
8 |
9 | {% block body %}
10 |
11 | {{ block('title') }}
12 |
13 | init_with_n_elements
option to ensure that your collection will be initialized with the given number of arguments.
14 |
15 | {% form_theme form 'jquery.collection.html.twig' %}
16 | {{ form(form) }}
17 |
18 |
19 |
20 | {% for value in formData.values %}
21 |
25 |
26 | {{ block('script') | e }}
28 |
29 | {{
30 | tabs([
31 | 'Base/BaseController.php',
32 | 'Controller/OptionsController.php',
33 | 'Resources/views/Options/givenMinimumElements.html.twig',
34 | ])
35 | }}
36 |
37 | {% endblock %}
38 |
39 | {% block script %}
40 |
41 |
52 |
53 | {% endblock %}
54 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/Options/hideMoveUpDown.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'FuzAppBundle::layout.html.twig' %}
2 |
3 | {% block extra_js %}
4 |
5 | {% endblock %}
6 |
7 | {% block title %}JavaScript options : hide Up and Down buttons on useless elements{% endblock %}
8 |
9 | {% block body %}
10 |
11 | {{ block('title') }}
12 |
13 | hide_useless_buttons
option to display or not the up button on the first item, and the down button on the last one.display:none
.
23 |
24 | {% for value in formData.values %}
25 |
29 |
30 | {{ block('script') | e }}
32 |
33 | {{
34 | tabs([
35 | 'Base/BaseController.php',
36 | 'Controller/OptionsController.php',
37 | 'Resources/views/Options/hideMoveUpDown.html.twig',
38 | 'Resources/views/Options/options-theme.html.twig',
39 | ])
40 | }}
41 |
42 | {% endblock %}
43 |
44 | {% block script %}
45 |
46 |
65 |
66 | {% endblock %}
67 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/Options/options-theme.html.twig:
--------------------------------------------------------------------------------
1 |
2 | {% block ValueType_label %}{% endblock %}
3 | {% block ValueType_errors %}{% endblock %}
4 |
5 | {% block ValueType_widget %}
6 |
7 | Try this plugin with another jQuery version
15 |
16 |
23 |
24 | {% for value in data.values %}
25 |
29 |
30 | {{ block('script') | e }}
32 |
33 | {% endblock %}
34 |
35 | {% block script %}
36 |
37 |
40 |
41 | {% endblock %}
42 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/github.html.twig:
--------------------------------------------------------------------------------
1 | {# see Fuz\AppBundle\Twig\Extension\HelperExtension.php #}
2 |
3 | {{ path }}
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/layout.html.twig:
--------------------------------------------------------------------------------
1 | {% extends 'FuzQuickStartBundle::layout.html.twig' %}
2 |
3 | {% block brand %}Symfony Collection{% endblock %}
4 | {% block title %}{% endblock %}
5 |
6 | {% block login %}{% endblock %}
7 | {% block translations %}{% endblock %}
8 |
9 | {% block menu %}
10 | {{ knp_menu_render('FuzAppBundle:Builder:mainMenu') }}
11 | {% endblock %}
12 |
--------------------------------------------------------------------------------
/src/Fuz/AppBundle/Resources/views/tabs.html.twig:
--------------------------------------------------------------------------------
1 |
14 | {{ contents }}