FAQ Database Discussion Community


Nested menu items at SonataAdminBundle sidebar

php,symfony2,sonata-admin,symfony-sonata,sonata
I would like to nested menu items like a tree. I have this configuration at the moment: dashboard: groups: company: icon: <i class="fa fa-lg fa-fw fa fa-cogs"></i> label: Company items: - sonata.admin.company - sonata.admin.brand - sonata.admin.media - sonata.admin.message territory: icon: <i class="fa fa-lg fa-fw fa fa-cogs"></i> label: Territory items: -...

SonataPageBundle with mongodb

mongodb,symfony-sonata,sonata
somebody has installed succesfully sonata page bundle with mongodb? We have a lot of trouble and seems that sonata page is not supported except with orm. Tnx all...

Symfony Sonata Media Bundle add images/videos to a user

php,symfony2,sonata,sonata-media-bundle
I am trying to integrate Sonata Media Bundle in my project. The problem is, that i don't understand how the bundle works. It has generated a Media, Gallery and GalleryHasMedia class within 'Application'. What are they for? How can I now add an images field and a videos field to...

Symfony / Sonata Admin: List form on Edit form

php,symfony2,sonata-admin,symfony-sonata,sonata
I have a one (category) to many (product) relationship set up, and I'd like to have a list of products show up at the bottom of the edit category page. It seems like this would be a common thing to do, but I haven't found any way to do it...

How to separate folders using IvoryCKEditorBundle for file uploads?

php,symfony2,ckeditor,sonata-admin,sonata
I'm using the following in my project: Symfony 2.3 IvoryCKEditorBundle CoopTilleulsCKEditorSonataMediaBundle My intention is that users can create their own pages for showing different types of information. However, users are separated by a certain kind of relationship (certain users belong to a certain school, so only users from that school...

Sonata admin enhanced view for security roles

symfony2,sonata-admin,symfony-sonata,sonata-user-bundle,sonata
In sonata admin the roles are based on admin services name with CRUD export and master permissions but the way it looks not so user friendly to create groups for others user or assign specific permissions to a user considering an example for sonata admin post module the service for...

Symfony2, Sonata : Getting rid of unnecessary fields in UserBundle

php,symfony2,doctrine2,sonata-user-bundle,sonata
I would like to not use some default fields giving by the Sonata User bundle. Such as facebook, gplus or twitters fields. I extended the SonataUserBundle in Application\Sonata\UserBundle with Easy-Extends. And created a new User entity extenting the BaseUser : class User extends BaseUser I deleted the xml doctrine config...

Symfony2, Sonata MediaBundle : add new fields to table

php,symfony2,doctrine2,sonata,sonata-media-bundle
I'm trying to add 4 new fields in Sonata MediaBundle for the GalleryHasMedia. I correctly override the GalleryHasMediaAdmin : To override it i added in services.yml this line : parameters: sonata.media.admin.gallery_has_media.class: Application\Sonata\MediaBundle\Admin\GalleryHasMediaAdmin I had to create the methods manually (getName and else) since php app/console doctrine:generate:entities ApplicationSonataMediaBundle:GalleryHasMedia apparently not caring...

Sonata Admin translation does not translate translation array

php,symfony2,sonata-admin,symfony-sonata,sonata
I am having a translation array in Sonata Admin that looks like this: messages.en.yml admin: form: label: identifier: identificationTitle: Some text here otherKey: blabla when I am trying to access it like this {{ 'admin.form.label.identifier.identificationTitle'|trans }} or like this {{ 'admin.form.label.identifier.identificationTitle'|trans({}, 'MyBundle') }} they don't work and I get as...

Symfony2, Sonata, UserBundle : Send email when user is enable on update

symfony2,swiftmailer,sonata-user-bundle,sonata
I would like to be able to send an email to the user when the admin enable the user in Sonata admin panel. I have to idea which file i should override or extend. I suppose it is similar to this subject or this stack-overflow subject: /** * {@inheritdoc} */...

sylius or sonata or custom for subscription based application

symfony2,subscription,sylius,multisite,sonata
We are going to build something like cratejoy.com, but don't want spend lot's of time building which is already builded before for developers. I was going through sonata and sylius, but not sure if we can build subscription based model with one of them. If yes we can, then which...

Sonata, Sf2 : Attempted to call method “ifTrue” on route /classification/context/create

php,symfony2,sonata-admin,sonata
I installed all the Bundles of Sonata following the documentation step by step. I still have few errors to fix on some actions such as deleting images. All the errors i'm facing right now seem related. I submited two issues, one SonataMediaBundle and one in SonataClassificationBundle. Attempted to call method...

Render partial twig in formmapper

php,forms,symfony2,sonata
Is it possible to render a view into a formmapper? The situation is like this: /** * @param FormMapper $formMapper */ protected function configureFormFields(FormMapper $formMapper) { $formMapper ->tab('Company') ->with('Info') ->add('name') ->end() ->end() ->tab('Abonnementen') ->with('Abonnementen', array('class' => 'col-md-12')) //Render a partial twig here ->end() ; } This is in my twig:...

Adding own action to SonataAdminBundle dropdown menu

symfony2,sonata
We use the SonataAdminBundle with our Symfony2 application. When editing an entity I want to add an own action to the dropdown menu which is located in the top right corner, but I have no idea how this works. I know I can add own routes via configureRoutes(RouteCollection $collection) and...

Sonata Bundle Issues [Product Bundle]

php,symfony2,sonata
I'm trying to set Sonata Bundles Ecommerce on Symfony 2.3. I followed install steps mentionned here but I'm getting an error when trying to load my page requesting app_dev.php. Here is the error FatalErrorException: Compile Error: Declaration of Sonata\ProductBundle\Entity\BaseProduct::validateOneMainCategory() must be compatible with Sonata\Component\Product\ProductInterface::validateOneMainCategory(Symfony\Component\Validator\Context\LegacyExecutionContext $context) in...

Sonata - missing user security status labels

symfony2,sonata-admin,symfony-sonata,sonata-user-bundle,sonata
I don't know why but since today Status labels just gone... I can change Status but there is no labels so I don't what I'm doing ;-) app\config\config.yml imports: - { resource: @MyProductBundle/Resources/config/parameters.yml } - { resource: security.yml } - { resource: services.yml } - { resource: @MyProductBundle/Resources/config/admin.yml } -...