-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extracted ReferenceCollectionType from the ProductCatalog
- Loading branch information
1 parent
cd4176a
commit 5e74c1b
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?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 | ||
{ | ||
/** @return class-string<\Symfony\Component\Form\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, | ||
], | ||
]); | ||
} | ||
} |