Skip to content

Commit

Permalink
IBX-7935: Allowed BC
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed May 10, 2024
1 parent 292ee47 commit 9d790b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/Form/Type/Content/BaseContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,19 @@ public function configureOptions(OptionsResolver $resolver)
'translation_domain' => 'ibexa_content_forms_content',
'contentCreateStruct' => null,
'contentUpdateStruct' => null,
'struct' => null,
])
->setAllowedTypes(
'struct',
[
'null',
ContentCreateStruct::class,
ContentUpdateStruct::class,
UserCreateStruct::class,
UserUpdateStruct::class,
],
)
->setNormalizer('struct', static function (Options $options, $value) {
->addNormalizer('struct', static function (Options $options, $value) {
if ($value !== null) {
return $value;
}
Expand All @@ -100,7 +102,7 @@ public function configureOptions(OptionsResolver $resolver)
}

return null;
})
}, true)
->setDeprecated(
'contentCreateStruct',
'ibexa/content-forms',
Expand Down
1 change: 1 addition & 0 deletions src/lib/Form/Type/Content/ContentFieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function configureOptions(OptionsResolver $resolver)
->setAllowedTypes(
'struct',
[
'null',
ContentCreateStruct::class,
ContentUpdateStruct::class,
UserCreateStruct::class,
Expand Down

0 comments on commit 9d790b3

Please sign in to comment.