Skip to content

Commit

Permalink
Extracted ReferenceCollectionType from the ProductCatalog (#1376)
Browse files Browse the repository at this point in the history
* Extracted ReferenceCollectionType from the ProductCatalog

* Remove unnecessary PHPStan docblock
  • Loading branch information
mikadamczyk authored Oct 25, 2024
1 parent 881be3b commit d97883a
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/lib/Form/Type/ReferenceCollectionType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace Ibexa\AdminUi\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\OptionsResolver\OptionsResolver;

final class ReferenceCollectionType extends AbstractType
{
public function getParent(): string
{
return CollectionType::class;
}

public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'required' => false,
'allow_add' => true,
'label' => false,
'entry_options' => [
'label' => false,
],
]);
}
}

0 comments on commit d97883a

Please sign in to comment.