mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix typing errors in customfieldbundle
This commit is contained in:
parent
06d6227d0e
commit
376ce59917
@ -42,8 +42,8 @@ class CustomFieldLongChoice extends AbstractCustomField
|
|||||||
$translatableStringHelper = $this->translatableStringHelper;
|
$translatableStringHelper = $this->translatableStringHelper;
|
||||||
$builder->add($customField->getSlug(), Select2ChoiceType::class, [
|
$builder->add($customField->getSlug(), Select2ChoiceType::class, [
|
||||||
'choices' => $entries,
|
'choices' => $entries,
|
||||||
'choice_label' => static fn (Option $option) => $translatableStringHelper->localize($option->getText()),
|
'choice_label' => static fn (?Option $option) => $translatableStringHelper->localize($option->getText()),
|
||||||
'choice_value' => static fn (Option $key): ?int => null === $key ? null : $key->getId(),
|
'choice_value' => static fn (?Option $key): ?int => $key?->getId(),
|
||||||
'multiple' => false,
|
'multiple' => false,
|
||||||
'expanded' => false,
|
'expanded' => false,
|
||||||
'required' => $customField->isRequired(),
|
'required' => $customField->isRequired(),
|
||||||
|
@ -46,11 +46,8 @@ class CustomFieldsGroup
|
|||||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
private $name;
|
private array|string $name;
|
||||||
|
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
private array $options = [];
|
private array $options = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user