Questions tagged [sonata-admin]

SonataAdminBundle is a Symfony bundle to generate robust user friendly administration interfaces.

Useful links

The Sonata Project is an open source set of bundles which are built on top of Symfony2. It's majorly based on the community work around the globe and uses the most known bundles released by:

2072 questions
6
votes
2 answers

SonataAdminBundle form field query

In SonataAdminBundle in Admin class I cannot make an orderBy on ManyToMany field. For example Author and Book. Author can have many books, as well as Book can have many Autors. In link above it is written that I can use a query for a form field. So…
Tom
  • 1,203
  • 3
  • 15
  • 35
6
votes
1 answer

No entity manager defined for class Doctrine\ORM\PersistentCollection

I'm using Symfony 4.1 with SonataAdminBundle 3.36. I get this error when I set ModelType::class on ManyToMany relation field call tags: No entity manager defined for class Doctrine\ORM\PersistentCollection Also I could not use sonata_type_model or…
6
votes
2 answers

Sonata admin can't get translation to work with sortable

I'm trying to configure translations using Gedmo, but Sortable behaviour I've enabled earlier seems to be getting in a way: An exception has been thrown during the rendering of a template ("The class…
Radek
  • 263
  • 3
  • 10
6
votes
1 answer

Multiple filter in sonata admin

I want to have that a filtered field in sonata admin datagrid mapper can be OR or AND connected with the user given filter values ... for example the field "Name" can be "John" or "Sandy" ... In the docs on…
Jim Panse
  • 2,220
  • 12
  • 34
6
votes
1 answer

Composer conflicts and Symfony 3

I'm totally new to composer and symfony, and i've started a symfony3 project. Things where going well, but now composer won't update my dependancies. I've been searching a solution for 3 hours. Here is my console log: Problem 1 -…
6
votes
5 answers

Sonata Admin Bundle: show total count of collection on list view

Is there any way to show total count of collection on list view? Imagine that there is a user that can have many links. How can I show total links count on list view?
Serhii Smirnov
  • 1,338
  • 1
  • 16
  • 24
6
votes
2 answers

Unable to generate a URL for the named route admin_sonata_classification_category_create

I'm done of installing calassification bundle wiht this error : An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "admin_sonata_classification_category_create" as such route does not…
Nacer Naciri
  • 67
  • 2
  • 8
6
votes
3 answers

Child Admin route is not being generated - Sonata Admin Bundle

I'm trying to set up an Admin as a child of an other Admin in Sonata Admin Bundle. I have 2 Admin classes: CategoryAdmin This class contains the following method protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInterface…
temparus
  • 119
  • 3
  • 10
6
votes
3 answers

save sonata media path into twig variable

I want to store full path of image (sonata media bundle) into variable in twig. Is that possible? If I write: {% set pic = path item.image, 'big' %} it throws me an error: Unexpected token "name" of value "item" ("end of statement block" expected)…
repincln
  • 2,029
  • 5
  • 24
  • 34
6
votes
1 answer

Correct way to use FormEvents to customise fields in SonataAdmin

I have a Sonata Admin class with some form fields in it, but I'd like to use the FormEvents::PRE_SET_DATA event to dynamically add another form field based on the bound data. However, I'm running into several problems: 1) The only way I can find to…
caponica
  • 3,788
  • 4
  • 32
  • 48
6
votes
6 answers

Change date format in xls export with Sonata Admin Bundle

I taken over responsibility for a Symfony2 application, built on the Sonata Admin Bundle, and have been asked to make a small change by the users. In the xls export of a list page, the dates all appear as e.g. Wed, 01 Aug 2012 00:00:00 +0200, but…
j_goldman
  • 231
  • 1
  • 5
  • 16
6
votes
2 answers

Symfony2 - The block type sonata.user.block.menu does not exist

i have one exception: An exception has been thrown during the rendering of a template ("The block type sonata.user.block.menu does not exist") in SonataUserBundle:Profile:action.html.twig at line 27. I have intalled a FOSUserBundle +…
6
votes
2 answers

datagrid filter for relation object as text field (insted of dropdown) in sonata admin in symfony 2.4

I have entity 'Action' with relation to 'User'. Created Admin CRUD controller in SonataAdminBundle. Everything works fine except user filter is rendered as dropdown list. I have 8k user count and growing so you must see why this is a problem. I want…
Aurelijus Rozenas
  • 2,176
  • 2
  • 28
  • 40
6
votes
1 answer

Sonata Admin Bundle custom query for list to use existing Repository

I have my admin class creating a custom list using createQuery method public function createQuery($context = 'list') { $query = parent::createQuery($context); $query->andWhere( .... ); .... return $query; } It all works…
Vladimir Cvetic
  • 832
  • 3
  • 8
  • 23
6
votes
4 answers

sonata admin - get post data

I'm learning symfony2 and sonata admin and came across few problems and this is one of them. I've created an admin class which extends sonata admin and the below wouldn't work for me: …
trikess
  • 71
  • 1
  • 5