Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NodeBundle]: add custom form type for node translations #1204

Merged
merged 1 commit into from
Jun 20, 2016
Merged

[NodeBundle]: add custom form type for node translations #1204

merged 1 commit into from
Jun 20, 2016

Conversation

sandergo90
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets

I have added a new form type to use instead of the EntityType when working with node translations.

When you want to have a entity fields that has a relationship to a node and you want to create a form for this entities relationship, you would normally use the EntityType. By using the NodeTranslationChoiceType, the title used as choice_label, will be automatically the title in the current language. You can also provide the "locale" parameter to set a default locale.

Example:

->add('question', NodeTranslationChoiceType::class, array( 'page_class' => array(StartersVraagPage::class), ) )

@jockri jockri merged commit 0c77593 into Kunstmaan:master Jun 20, 2016
@jockri jockri added this to the 3.5.2 milestone Jun 20, 2016
@sandergo90 sandergo90 deleted the nodeChoiceType branch July 7, 2016 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants