mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-06-01 03:30:18 -07:00
Group themes in search form
This commit is contained in:
parent
cf27da5521
commit
2b445f0033
@ -60,6 +60,10 @@ class SetSearchType extends AbstractType
|
|||||||
'choices' => $this->themeRepository->findAll(),
|
'choices' => $this->themeRepository->findAll(),
|
||||||
'choice_label' => 'fullName',
|
'choice_label' => 'fullName',
|
||||||
'choice_translation_domain' => false,
|
'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',
|
'choice_value' => 'id',
|
||||||
'placeholder' => 'set.form.theme.all',
|
'placeholder' => 'set.form.theme.all',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user