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:
parent
cf27da5521
commit
2b445f0033
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user