Skip to content

Latest commit

 

History

History
19 lines (18 loc) · 540 Bytes

README.md

File metadata and controls

19 lines (18 loc) · 540 Bytes

Updated for symfony 4.

  • Use GedmoTranslationsType::class

Example for Sonata Admin.

    ->add('translations', GedmoTranslationsType::class, [
        'translatable_class' => $this->getClass(),
        'fields' => [
            'title' => [
                'label' => 'Назва',
                'locale_options' => ['uk' => ['required' => true]],
            ],
            'text' => [
                'label' => 'Текст',
                'locale_options' => ['uk' => ['required' => true]],
            ],
        ],
    ])