mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
csfixes
This commit is contained in:
parent
c1036a3627
commit
25264447bc
@ -21,7 +21,6 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PickCivilityType extends AbstractType
|
||||
{
|
||||
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
||||
@ -33,23 +32,26 @@ class PickCivilityType extends AbstractType
|
||||
{
|
||||
$resolver
|
||||
->setDefault('label', 'Civility')
|
||||
->setDefault('choice_label', function (Civility $civility): string {
|
||||
->setDefault(
|
||||
'choice_label',
|
||||
function (Civility $civility): string {
|
||||
return $this->translatableStringHelper->localize($civility->getName());
|
||||
}
|
||||
}
|
||||
)
|
||||
->setDefault('query_builder', function (EntityRepository $er): QueryBuilder {
|
||||
->setDefault(
|
||||
'query_builder',
|
||||
static function (EntityRepository $er): QueryBuilder {
|
||||
return $er->createQueryBuilder('c')
|
||||
->where('c.active = true')
|
||||
->orderBy('c.order');
|
||||
},
|
||||
},
|
||||
)
|
||||
->setDefault('placeholder', 'choose civility')
|
||||
->setDefault('class', Civility::class);
|
||||
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Form;
|
||||
|
||||
use Chill\CustomFieldsBundle\Form\Type\CustomFieldType;
|
||||
use Chill\MainBundle\Entity\Civility;
|
||||
use Chill\MainBundle\Form\Type\ChillCollectionType;
|
||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||
@ -28,9 +27,6 @@ use Chill\PersonBundle\Form\Type\GenderType;
|
||||
use Chill\PersonBundle\Form\Type\PersonAltNameType;
|
||||
use Chill\PersonBundle\Form\Type\PersonPhoneType;
|
||||
use Chill\PersonBundle\Form\Type\Select2MaritalStatusType;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\CallbackTransformer;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
@ -194,7 +190,7 @@ class PersonType extends AbstractType
|
||||
->add('civility', PickCivilityType::class, [
|
||||
'required' => false,
|
||||
'label' => 'Civility',
|
||||
'placeholder' => 'choose civility'
|
||||
'placeholder' => 'choose civility',
|
||||
]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user