mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
review: fix stuffs on socialAction and socialIssue filters:
* filters call static entity method * add renderString option to manage add_children * add tests on new entity method getDescendantsWithThisFor..() * rename function in repository * rename 'Select2..' classes by 'Pick..' and replace all occurences
This commit is contained in:
@@ -18,7 +18,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class Select2SocialActionType extends AbstractType
|
||||
class PickSocialActionType extends AbstractType
|
||||
{
|
||||
private SocialActionRender $actionRender;
|
||||
|
||||
@@ -37,7 +37,7 @@ class Select2SocialActionType extends AbstractType
|
||||
$resolver
|
||||
->setDefaults([
|
||||
'class' => SocialAction::class,
|
||||
'choices' => $this->actionRepository->findActionsNotDesactivated(),
|
||||
'choices' => $this->actionRepository->findAllActive(),
|
||||
'choice_label' => function (SocialAction $sa) {
|
||||
return $this->actionRender->renderString($sa, []);
|
||||
},
|
@@ -18,7 +18,7 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class Select2SocialIssueType extends AbstractType
|
||||
class PickSocialIssueType extends AbstractType
|
||||
{
|
||||
private SocialIssueRender $issueRender;
|
||||
|
||||
@@ -37,7 +37,7 @@ class Select2SocialIssueType extends AbstractType
|
||||
$resolver
|
||||
->setDefaults([
|
||||
'class' => SocialIssue::class,
|
||||
'choices' => $this->issueRepository->findIssuesNotDesactivated(),
|
||||
'choices' => $this->issueRepository->findAllActive(),
|
||||
'choice_label' => function (SocialIssue $si) {
|
||||
return $this->issueRender->renderString($si, []);
|
||||
},
|
Reference in New Issue
Block a user