1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-28 01:30:11 -07:00

Group themes in search form

This commit is contained in:
David Hübner 2017-05-28 19:26:56 +02:00
parent cf27da5521
commit 2b445f0033

View File

@ -60,6 +60,10 @@ class SetSearchType extends AbstractType
'choices' => $this->themeRepository->findAll(),
'choice_label' => 'fullName',
'choice_translation_domain' => false,
'group_by' => function($theme, $key, $index) {
$parent = $theme->getParent();
return $parent ? $parent->getParent() ? $parent->getParent()->getName() : $parent->getName() : $theme->getName();
},
'choice_value' => 'id',
'placeholder' => 'set.form.theme.all',
'required' => false,