mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Remove usage of defaultLocaleCode from SelectAttributeChoicesCollectionType
This commit is contained in:
parent
163953bf8e
commit
ec4d4d890f
2 changed files with 0 additions and 13 deletions
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
|||
namespace Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration;
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
|
@ -23,13 +22,6 @@ use Symfony\Component\Form\FormEvents;
|
|||
|
||||
class SelectAttributeChoicesCollectionType extends AbstractType
|
||||
{
|
||||
private string $defaultLocaleCode;
|
||||
|
||||
public function __construct(TranslationLocaleProviderInterface $localeProvider)
|
||||
{
|
||||
$this->defaultLocaleCode = $localeProvider->getDefaultLocaleCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-suppress InvalidScalarArgument Some weird magic going on here, not sure about refactor
|
||||
*/
|
||||
|
|
@ -48,10 +40,6 @@ class SelectAttributeChoicesCollectionType extends AbstractType
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!array_key_exists($this->defaultLocaleCode, $values)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$key = (string) $key;
|
||||
$newKey = $this->getUniqueKey();
|
||||
$fixedData[$newKey] = $this->resolveValues($values);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@
|
|||
</service>
|
||||
|
||||
<service id="sylius.form.type.attribute_type.select.choices_collection" class="Sylius\Bundle\AttributeBundle\Form\Type\AttributeType\Configuration\SelectAttributeChoicesCollectionType">
|
||||
<argument id="sylius.translation_locale_provider" type="service"/>
|
||||
<tag name="form.type" />
|
||||
</service>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue