2017 © Pedro Peláez
 

symfony-bundle gedmo-translation-form

image

tobur/gedmo-translation-form

  • Friday, July 27, 2018
  • by Tobur
  • Repository
  • 1 Watchers
  • 0 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 78 % Grown

The README.md

How to look like, (*1)

Setup:, (*2)

composer require tobur/gedmo-translation-form

Add to config parameters:, (*3)

locales:
  - ua
  - en
default_locale: ua

To twig:, (*4)

twig:
  form_themes:
    - 'GedmoTranslationFormBundle:Form:translatable.html.twig'

How to use in Sonata "configureFormFields":, (*5)

        $formMapper->add(
            'name',
            TranslationType::class,
            [
                'required_locales' => ['en'],
                'type' => TextType::class,
            ]
        );

        $formMapper->getFormBuilder()->setData($this->getSubject());

The Versions