简体   繁体   中英

Render custom list of related entities as form using SonataAdmin bundle

I am using Sonata Admin bundle in my Symfony app with doctrine. Now I am facing to some specific requirement whose solution or good/best practice I could not find anywhere.

To explain my issue I will use three simple entities as below.

在此处输入图片说明

So every news can have title and description different for every language.

Now what I need. In form view (detail) of news I want to:

  1. have inputs of news attributes. (like code or created_date in this case)
  2. then I want to see titles and descriptions for all languages related to current news. And in case, that news has not translation for some language, it means that there is no relation in News_Translation, I want to see empty inputs.

So everything in one view (maybe split it into more tabs). And here is a simple example of news detail (form view) for better understanding

在此处输入图片说明

Is it possible to attain something like this? I am open to any other ideas how to solve it using sonata-admin.

KunstmaanTranslatorBundle is a bundle which enables editing translations in the admin interface without need for editing the translations files. Translations will be stored in a (default) database and retrieved on the most efficient way possible. KunstmaanTranslatorBundle

Doc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM