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
5
votes
3 answers

Symfony\Component\Locale\Stub\StubIntlDateFormatter::__construct() method's argument $locale value 'en_IN' behavior is not implemented

I am getting this exception, its one of the known issues and as suggested I have installed php5-intl via apt-get and restarted my Nginx server. Nothing seems to work out. An exception has been thrown during the rendering of a template ("The…
ʞɹᴉʞ ǝʌɐp
  • 5,350
  • 8
  • 39
  • 65
5
votes
2 answers

Overriding the User Admin Form

I'm trying to override the SonataUser/Admin/Model/UserAdmin's configureFormFields() because I need to remove some default fields from the admin form. So I have copied the file vendor/bundles/Sonata/UserBundle/Admin/Model/UserAdmin.php in my bundle…
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
4
votes
4 answers

Disable 'add' with sonata_type_collection in SonataAdminBundle forms

Does anyone out there know how I can get rid of the green pluses that allow adding a new item to a collection in the sonata admin forms? The native collectiontype has allow_add & allow_delete, but sonata_type_collection doesn't seem to notice those…
user1207727
  • 1,543
  • 1
  • 15
  • 18
4
votes
1 answer

SonataAdmin, Add a item to the side menu

I am trying to add the items/route to the side menu, basically I have User which has list and add functionality listed in dashboard, now I would like to have these under my sidebar menu too. I registered a service: #config/services.yml …
ro ko
  • 2,906
  • 3
  • 37
  • 58
4
votes
2 answers

Sonata admin: mosaic selected by default

I am using Sonata Admin and I have a list and a mosaic view. How to select the mosaic view by default? I do not want to HIDE the list view, just select the mosaic view by default.
c.bermon
  • 69
  • 5
4
votes
0 answers

Set values for sonata embedded admin

I have two entities : Partner linked to Media. I created my Partner admin and I would like to link an image for each partner. I just want to upload a file in Partner Admin and then set the filename attribute of the media (depending on the partner…
Putxe
  • 1,054
  • 1
  • 16
  • 23
4
votes
1 answer

Sonata Admin Bundle: How to add a "Delete" button in form, to the entities on the nested entities list?

In the parent entity I can do something like that: protected function configureFormFields(FormMapper $formMapper) { $formMapper->add('units', 'sonata_type_collection', [ 'required' => true, 'by_reference' => false, …
4
votes
1 answer

Sonata form field - change a field based on the selection of another model field

I have a very simple problem and I think it is also very common. My sonata admin configureFormFields function looks like: protected function configureFormFields(FormMapper $formMapper) { $formMapper ->add('status', 'sonata_type_model',…
Stiff Roy
  • 124
  • 1
  • 14
4
votes
1 answer

Sonata bundle, how can I get current logged in user?

Lets say I have a Car Entity. Other than typical Car properties I have updatedBy attribute In sonata I created a CRUD admin page using AppBundle\Admin\CarAdmin.php Inside the class CarAdmin I have the required methods like configureListFields,…
4
votes
1 answer

How to include layout to SonataAdminBundle tab with use sonata_type_admin

I use Symfony2 with SonataAdminBundle, and I have a problem where I add a Tab with sonata_type_admin Entity edit. If I go to Entity edit page - all right, but if I add field in OneToOne relationship on tab layout not loaded and all in one style.…
2ball
  • 86
  • 1
  • 7
4
votes
1 answer

Remove child admins from sidemenu in sonata-admin

I have one EmployeeAdmin in sonata-admin, configured with three child admins: sonata.admin.employee: class: Medicina\InasistenciasBundle\Admin\EmployeeAdmin tags: - { name: sonata.admin, manager_type: orm, group: "Contenido", label:…
jlasarte
  • 623
  • 8
  • 28
4
votes
2 answers

Symfony2 + SonataAdmin + VichUploaderBundle - Image Upload Field

Spent last days trying, as a newcomer to Symfony find a good solution on integrating a image upload field in an existing Entity in Sonata Admin. I've been Googling and following guides available but unfortunately I cannot figure it out. Setup as…
4
votes
1 answer

Sonata User Bundle + Admin Bundle admin redirect after login

I'm trying to make sonata work like this: - if a regular user logs in he's redirected to "/" - if an admin logs in he's redirected to "/admin/dashboard" I tried to make it with firewalls that are in app/config/security.yml and here's what i come…
nonab
  • 311
  • 2
  • 12
4
votes
1 answer

Custom query or specific getter method for sonata_type_collection form type

I have a Trip entity that has many HoneymoonComponent. In the TripAdmin, I am using a sonata_type_collection to edit inline all the HoneymoonComponent related: $formMapper ->add('isHoneymoonEnabled', null) …
4
votes
1 answer

show/hide some menus depend on the Sonata admin ROLE

I'm working on a web project using Symfony2 , and i used Sonata Admin for the admin Panel , every thing works fine but what i want to do is ,on the dashboard menus of sonata Admin , i need to show hide some menus depend on the admin ROLE , so did…
user2353899