|
|
|
|
|
|
|
|
$this->rolesDefinition = $rolesDefinition; |
|
|
$this->rolesDefinition = $rolesDefinition; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function configureFieldsIndex(): array |
|
|
|
|
|
|
|
|
public function configureIndex(): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
'id', |
|
|
|
|
|
'gender', |
|
|
|
|
|
'lastname', |
|
|
|
|
|
'firstname', |
|
|
|
|
|
'email', |
|
|
|
|
|
|
|
|
'id', |
|
|
|
|
|
'gender', |
|
|
|
|
|
'lastname', |
|
|
|
|
|
'firstname', |
|
|
|
|
|
'email', |
|
|
'groupUsers' |
|
|
'groupUsers' |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function configureFieldsForm(): array |
|
|
|
|
|
|
|
|
public function configureForm(): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
'id', |
|
|
|
|
|
'gender', |
|
|
|
|
|
'lastname', |
|
|
|
|
|
'firstname', |
|
|
|
|
|
'email', |
|
|
|
|
|
'phone', |
|
|
|
|
|
'birthdate', |
|
|
|
|
|
'groupUsers', |
|
|
|
|
|
'ticketTypesNotification' |
|
|
|
|
|
|
|
|
'id', |
|
|
|
|
|
'gender', |
|
|
|
|
|
'lastname', |
|
|
|
|
|
'firstname', |
|
|
|
|
|
'email', |
|
|
|
|
|
'phone', |
|
|
|
|
|
'birthdate', |
|
|
|
|
|
'groupUsers', |
|
|
|
|
|
'ticketTypesNotification' |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function configureFields(): array |
|
|
public function configureFields(): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
'id' => IntegerField::new('id')->onlyOnIndex()->setSortable(true), |
|
|
|
|
|
'gender' => ChoiceField::new('gender')->setChoices( |
|
|
|
|
|
$this->translatorAdmin->transChoices(UserSolver::getGenderChoices(), 'User', 'gender') |
|
|
|
|
|
) |
|
|
|
|
|
->setFormTypeOption('expanded', true) |
|
|
|
|
|
->setFormTypeOption('multiple', false) |
|
|
|
|
|
->setSortable(true), |
|
|
|
|
|
'lastname' => TextField::new('lastname')->setSortable(true), |
|
|
|
|
|
'firstname' => TextField::new('firstname')->setSortable(true), |
|
|
|
|
|
'email' => TextField::new('email')->setSortable(true), |
|
|
|
|
|
'phone' => TextField::new('phone')->setSortable(true), |
|
|
|
|
|
'birthdate' => DateField::new('birthdate') |
|
|
|
|
|
->setFormTypeOption('required', false) |
|
|
|
|
|
->setSortable(true), |
|
|
|
|
|
'groupUsers' => AssociationField::new('groupUsers')->setSortable(true), |
|
|
|
|
|
'ticketTypesNotification' => ChoiceField::new('ticketTypesNotification') |
|
|
|
|
|
->setSortable(true) |
|
|
|
|
|
->setFormTypeOption('expanded', false) |
|
|
|
|
|
->setFormTypeOption('multiple', true) |
|
|
|
|
|
->setChoices($this->translatorAdmin->transChoices( |
|
|
|
|
|
TicketSolver::getTypeChoices(), |
|
|
|
|
|
'Ticket', |
|
|
|
|
|
'type' |
|
|
|
|
|
)), |
|
|
|
|
|
'roles' => ChoiceField::new('roles') |
|
|
|
|
|
->allowMultipleChoices() |
|
|
|
|
|
->autocomplete() |
|
|
|
|
|
->setChoices($this->rolesDefinition->getRolesList()), |
|
|
|
|
|
|
|
|
'id' => IntegerField::new('id')->onlyOnIndex()->setSortable(true), |
|
|
|
|
|
'gender' => ChoiceField::new('gender')->setChoices( |
|
|
|
|
|
$this->translatorAdmin->transChoices(UserSolver::getGenderChoices(), 'User', 'gender') |
|
|
|
|
|
) |
|
|
|
|
|
->setFormTypeOption('expanded', true) |
|
|
|
|
|
->setFormTypeOption('multiple', false) |
|
|
|
|
|
->setSortable(true), |
|
|
|
|
|
'lastname' => TextField::new('lastname')->setSortable(true), |
|
|
|
|
|
'firstname' => TextField::new('firstname')->setSortable(true), |
|
|
|
|
|
'email' => TextField::new('email')->setSortable(true), |
|
|
|
|
|
'phone' => TextField::new('phone')->setSortable(true), |
|
|
|
|
|
'birthdate' => DateField::new('birthdate') |
|
|
|
|
|
->setFormTypeOption('required', false) |
|
|
|
|
|
->setSortable(true), |
|
|
|
|
|
'groupUsers' => AssociationField::new('groupUsers')->setSortable(true), |
|
|
|
|
|
'ticketTypesNotification' => ChoiceField::new('ticketTypesNotification') |
|
|
|
|
|
->setSortable(true) |
|
|
|
|
|
->setFormTypeOption('expanded', false) |
|
|
|
|
|
->setFormTypeOption('multiple', true) |
|
|
|
|
|
->setChoices( |
|
|
|
|
|
$this->translatorAdmin->transChoices( |
|
|
|
|
|
TicketSolver::getTypeChoices(), |
|
|
|
|
|
'Ticket', |
|
|
|
|
|
'type' |
|
|
|
|
|
) |
|
|
|
|
|
), |
|
|
|
|
|
'roles' => ChoiceField::new('roles') |
|
|
|
|
|
->allowMultipleChoices() |
|
|
|
|
|
->autocomplete() |
|
|
|
|
|
->setChoices($this->rolesDefinition->getRolesList()), |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|