Created
February 8, 2025 20:25
-
-
Save xabbuh/4e58da745fabc4255e82f086f1a7f7cc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
namespace App\Form\Extension; | |
use Symfony\Component\Form\AbstractTypeExtension; | |
use Symfony\Component\Form\Extension\Core\Type\FormType; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
class LabelTranslationDomainExtension extends AbstractTypeExtension | |
{ | |
public function configureOptions(OptionsResolver $resolver): void | |
{ | |
$resolver->setDefault('translation_domain', 'form_labels'); | |
} | |
public static function getExtendedTypes(): iterable | |
{ | |
yield FormType::class; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment