mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
ChillPersonBundle: move numberOfDependents configuration to a new household node; extend AdministrativeStatusRepository and EmploymentStatusRepository from ServiceEntityRepository
This commit is contained in:
@@ -23,14 +23,14 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
|
||||
class HouseholdCompositionType extends AbstractType
|
||||
{
|
||||
private array $fields_visibility;
|
||||
private array $household_fields_visibility;
|
||||
|
||||
public function __construct(
|
||||
private readonly HouseholdCompositionTypeRepository $householdCompositionTypeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
protected ParameterBagInterface $parameterBag,
|
||||
) {
|
||||
$this->fields_visibility = $parameterBag->get('chill_person.person_fields');
|
||||
$this->household_fields_visibility = $parameterBag->get('chill_person.household_fields');
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
@@ -52,7 +52,7 @@ class HouseholdCompositionType extends AbstractType
|
||||
'required' => true,
|
||||
'label' => 'household_composition.numberOfChildren',
|
||||
]);
|
||||
if ('visible' == $this->fields_visibility['number_of_dependents']) {
|
||||
if ('visible' == $this->household_fields_visibility['number_of_dependents']) {
|
||||
$builder
|
||||
->add('numberOfDependents', IntegerType::class, [
|
||||
'required' => true,
|
||||
|
Reference in New Issue
Block a user