Questions tagged [symfony-sonata]

The goal of the Sonata Project is to provide an e-commerce framework solution based on the Symfony (version 2 and 3) framework.

The goal of the Sonata Project is to provide an e-commerce framework solution based on the Symfony2 framework. Think of it as a toolkit based on Symfony2 components to make building e-commerce sites easy and fun!

http://sonata-project.org/about

599 questions
3
votes
2 answers

SonataAdminBundle: Redirect to list view doesn't save pagination

I have a project using Symfony 2.5 with SonataAdminBundle (http://sonata-project.org/) with a list of Posts, using pagination and list filtering that comes generic with the bundle. If I go to n-th page using pagination, then go to 'Edit' page and…
Ulugbek
  • 164
  • 1
  • 8
3
votes
1 answer

What is context in Sonata Block Bundle

What does the context means inside the configurations of the Sonata Block Bundle? What is for? sonata_block: default_contexts: [cms] blocks: sonata.admin.block.admin_list: contexts: [admin]
Guillermo Gutiérrez
  • 17,273
  • 17
  • 89
  • 116
3
votes
0 answers

use named Assetic resource in BlockService

Which service do I inject into my custom block service so that I can use assetic to generate a valid absolute url for block-specific resources (both js and css)? I want something like this: class CustomBlockService extends…
dnagirl
  • 20,196
  • 13
  • 80
  • 123
3
votes
4 answers

Sonata Media Bundle remove gallery

I have the Sonata Media Bundle installed but I don't use the gallery portion of the bundle. How do I disable the Gallery? I am using Symfony 2.3 and I have the standard Media Bundle install as per the documentation. Solution thus far: If you look…
nienaber
  • 189
  • 2
  • 12
3
votes
1 answer

Display name instead of DB value in SonataAdmin List View

I'm having a problem when I try to list the record from DB since I get the value stored in row which is a integer but I want the string instead. How I'm handling the form? In this way: protected function configureFormFields(FormMapper $form) { …
Reynier
  • 2,420
  • 11
  • 51
  • 91
3
votes
3 answers

Mapping exception after install SonataMediaBundle

I'm trying to setup and use SonataMediaBundle for use inside SonataAdminBundle. I read and follow every step in docs for SMB. When I run the command: php app/console sonata:easy-extends:generate SonataMediaBundle By default this create the Bundle…
Reynier
  • 2,420
  • 11
  • 51
  • 91
3
votes
1 answer

SonataAdmin - The custom block I'm trying to build is not found

I'm trying to add a custom block to the dashboard of SonataAdminBundle. I followed the instructinos here (How to add custom link or button to SonataAdminBundle Dashboard in Symfony2) and I'm getting the following error : RuntimeException: The…
Etienne Noël
  • 5,988
  • 6
  • 48
  • 75
3
votes
1 answer

Sonata Admin: Want to create global configuration page

I need to create signle global configuration page without list view, just single page with number of inputs like: fb page link google analytics id some default front-end texts checkbox options: show intro, show social media etc. something that…
ShachMaT
  • 33
  • 6
3
votes
1 answer

Sonata Admin: Use multiple document classes (types)

As you know, all God's creatures are different. They best fit into a non-relational database like mongodb. Let's say I have a ZooCollecion with different Animal Document Objects. How can I use sonata-admin, to change the document class with a…
mate64
  • 9,876
  • 17
  • 64
  • 96
3
votes
2 answers

Display the Sonata Admin Bundle inside a view of a Symfony Bundle

My question is simple but I don't think that the answer is. I'll try to be clear as possible. I have the Sonata Admin Bundle, that allows me edit or view tables, etc. It's ok. I also have a custom bundle (where my main app is). The interface of this…
user2474622
3
votes
2 answers

Call custom function of controller from ajax symfony2

I've created the forms using Sonata Admin Bundle. Then I've created my own Controller (TestController) and override the CRUD controller, I've added a new function in the TestController, namespace IFI2\MainProjectBundle\Controller; use…
3
votes
0 answers

Sonata Media Bundle : How to set the default value of a media field?

I'm currently Sonata Media Bundle for my project. In one of my Entity Form Type that has some Media fields, I added these fields : add('image', 'sonata_media_type', array( 'provider' => 'sonata.media.provider.image', …
MeuhMeuh
  • 826
  • 6
  • 26
3
votes
3 answers

How to validation to sonata media type in symfony 2

I'm trying hard to find out a way to validate sonata media type form filed. My entity is related to media table with one-to-one relation . Here is relation oneToOne: user: targetEntity: Sinepulse\UserBundle\Entity\User mappedBy:…
Al- Imran Khan
  • 187
  • 1
  • 5
  • 14
3
votes
2 answers

Add own field to Admin Sonata

I would like make log system for many Entity. For example i have Entity: Blog, Page and News. They are admin class: class (Blog|Page|News/)Admin.php { protected function configureFormFields(FormMapper $formMapper) { $formMapper …
3
votes
1 answer

What does _sonata_admin: {resource: . } do in routing.yml?

When setting up SonataAdmin, you have to add an entry like this one: _sonata_admin: resource: . type: sonata_admin prefix: /admin In this entry, what does resource: . do? It's somewhat unusual syntax and I'd like to add a footnote about…
caponica
  • 3,788
  • 4
  • 32
  • 48