Skip to content

Commit

Permalink
Merge 4.x into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Apr 14, 2024
2 parents cd66f0f + 0f2c98d commit 9bbbf54
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.17.0](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/4.16.1...4.17.0) - 2024-04-13
### Added
- [[#1805](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1805)] Allow to pass extra field options in ClassFilter ([@VincentLanglet](https://github.com/VincentLanglet))

## [4.16.1](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/compare/4.16.0...4.16.1) - 2024-04-10
### Fixed
- [[#1803](https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/1803)] UidFilter `global_search` default value ([@VincentLanglet](https://github.com/VincentLanglet))
Expand Down
12 changes: 8 additions & 4 deletions src/Filter/ClassFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function getDefaultOptions(): array
{
return [
'field_type' => ChoiceType::class,
'field_options' => [],
'operator_type' => EqualOperatorType::class,
'operator_options' => [],
];
Expand All @@ -57,10 +58,13 @@ public function getFormOptions(): array
{
return [
'field_type' => $this->getFieldType(),
'field_options' => [
'required' => false,
'choices' => $this->getOption('sub_classes'),
],
'field_options' => array_merge(
[
'required' => false,
'choices' => $this->getOption('sub_classes'),
],
$this->getFieldOptions(),
),
'operator_type' => $this->getOption('operator_type'),
'operator_options' => $this->getOption('operator_options'),
'label' => $this->getLabel(),
Expand Down

0 comments on commit 9bbbf54

Please sign in to comment.