Skip to content

Commit

Permalink
Allow reusing of the MediaType for other correctly interfaced media o…
Browse files Browse the repository at this point in the history
…bjects (#2313)

The default value for data_class is set to `$this->class` already and it is configurable, allowing override improved reusability without breaking anything.
  • Loading branch information
esserj authored Jun 25, 2022
1 parent bf57a48 commit 19f702f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Type/MediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(Pool $pool, string $class)

public function buildForm(FormBuilderInterface $builder, array $options): void
{
$dataTransformer = new ProviderDataTransformer($this->pool, $this->class, [
$dataTransformer = new ProviderDataTransformer($this->pool, $options['data_class'], [
'provider' => $options['provider'],
'context' => $options['context'],
'empty_on_new' => $options['empty_on_new'],
Expand Down

0 comments on commit 19f702f

Please sign in to comment.