sonata

sonata and single page

拈花ヽ惹草 提交于 2019-12-02 08:10:57
问题 i'm newbie of sonata, i have a ContentTestAdmin with entity etc, that can only contains 4 record - record 1 - record 2 - record 3 - record 4 i already disabled create and delete function public function configureRoutes(RouteCollection $collection) { $collection->remove('create')->remove('delete'); } but i need to change link on dashboard and on the left menu: actually i put on my service.yml admin.comuni: class: AppBundle\Admin\ContentTestAdmin arguments: [~, AppBundle\Entity\ContentTest, ~]

sonata and single page

我的梦境 提交于 2019-12-02 03:38:14
i'm newbie of sonata, i have a ContentTestAdmin with entity etc, that can only contains 4 record - record 1 - record 2 - record 3 - record 4 i already disabled create and delete function public function configureRoutes(RouteCollection $collection) { $collection->remove('create')->remove('delete'); } but i need to change link on dashboard and on the left menu: actually i put on my service.yml admin.comuni: class: AppBundle\Admin\ContentTestAdmin arguments: [~, AppBundle\Entity\ContentTest, ~] tags: - { name: sonata.admin, manager_type: orm, label: Content Test, group: Main Section } and i see

Sonata admin bundle order

一个人想着一个人 提交于 2019-11-29 05:54:52
How to change default entity order in SonataAdminBundle for list action? answer :) add this to your admin class protected $datagridValues = array( '_page' => 1, '_sort_order' => 'DESC', // sort direction '_sort_by' => 'id' // field name ); pilot You can add another sort order or set a default one via the constructor like this: public function __construct($code, $class, $baseControllerName) { parent::__construct($code, $class, $baseControllerName); if (!$this->hasRequest()) { $this->datagridValues = array( '_page' => 1, '_sort_order' => 'ASC', // sort direction '_sort_by' => 'artist_id' //

Symfony doctrine auto_mapping Unrecognized

一笑奈何 提交于 2019-11-29 03:21:02
I have added SonataUserBundle and it is giving error config.yml doctrine: orm: auto_generate_proxy_classes: "%kernel.debug%" naming_strategy: doctrine.orm.naming_strategy.underscore auto_mapping: true entity_managers: default: mappings: ApplicationSonataUserBundle: ~ SonataUserBundle: ~ error Unrecognized options "naming_strategy, auto_mapping, dql" under "doctrine.orm" You are mixing shortened and full configuration. If you just want to use the default entity manager then you can place everything under the orm key (the shortened config). This will be remapped so that it is under doctrine.orm

Sonata admin bundle order

不问归期 提交于 2019-11-27 23:26:27
问题 How to change default entity order in SonataAdminBundle for list action? answer :) add this to your admin class protected $datagridValues = array( '_page' => 1, '_sort_order' => 'DESC', // sort direction '_sort_by' => 'id' // field name ); 回答1: You can add another sort order or set a default one via the constructor like this: public function __construct($code, $class, $baseControllerName) { parent::__construct($code, $class, $baseControllerName); if (!$this->hasRequest()) { $this-

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