mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Admin form : only display active ActivityReasonCategory in the ActivityReason form
This commit is contained in:
parent
e32dad5617
commit
e8f8c8e52d
@ -25,6 +25,7 @@ namespace Chill\ActivityBundle\Form\Type;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* Description of TranslatableActivityReasonCategory
|
||||
@ -61,7 +62,11 @@ class TranslatableActivityReasonCategory extends AbstractType
|
||||
$resolver->setDefaults(
|
||||
array(
|
||||
'class' => 'ChillActivityBundle:ActivityReasonCategory',
|
||||
'property' => 'name['.$locale.']'
|
||||
'property' => 'name['.$locale.']',
|
||||
'query_builder' => function (EntityRepository $er) {
|
||||
return $er->createQueryBuilder('c')
|
||||
->where('c.active = true');
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user