sonata-admin

How to print translatable data in sonata admin with DoctrineBehaviors from kpnlabs

左心房为你撑大大i 提交于 2019-11-26 23:25:54
问题 I'm just looking the good way to use DoctrineBehaviors by knplabs. I have allready render a form in sonata admin bundle with the help of this bundle : https://github.com/a2lix/TranslationFormBundle Now, i want to have my translated field in the admin list. At this time, it's work with this method: /** * @ORM\Entity * @ORM\Table(name="sport") */ class Sport { ... public function getNom(){ return $this->translate()->getNom(); } } It's work but, i have to remap all the translated field in the

Handling multiple file uploads in Sonata Admin Bundle

隐身守侯 提交于 2019-11-26 18:22:48
问题 So, after research a lot and get no results (maybe I'm a bad searcher) I coming from this topics: SonataAdmin Bundle File Upload Error and SonataMediaBundle - how to upload images? I can't find a solution for my problem. I have a Entity Company and each company can have multiple files: PDF, DOC, XLS and some other mime/types. I think to use VichUploaderBundle but again docs only covers example for one to one relationship so my question is, any can give me some examples or ways to get this

How to add custom link or button to SonataAdminBundle Dashboard in Symfony2

筅森魡賤 提交于 2019-11-26 15:19:49
问题 I am new with symfony2 and SonataAdminBundle. I have added 3 entities to the SonataAdminBundle Dashboard and they appear successfully. The Entities appear with the default links - "Add new" and "List" buttons. I want to be able to do the following I want to add a third link to one of the entities on the dashboard. I want to be able to add a link to the buttons located above the grid in the default list page. I want to be able to add/customize links appearing under the form on Edit or Create

How to use Ajax within Sonata Admin forms?

孤人 提交于 2019-11-26 09:17:12
问题 I have a Merchant entity with the following fields and associations:- /** * @ORM\\ManyToMany(targetEntity=\"Category\", inversedBy=\"merchants\") */ public $categories; /** * @ORM\\ManyToMany(targetEntity=\"Tag\", inversedBy=\"merchants\") */ public $tags; /** * @ORM\\ManyToOne(targetEntity=\"Category\", inversedBy=\"merchants\") */ protected $primaryCategory; /** * @ORM\\ManyToOne(targetEntity=\"Tag\", inversedBy=\"merchants\") */ protected $primaryTag; The Tags and Categories also have a