sonata

SonataMediaBundle - S3 AWS: 'The configured bucket “my-bucket” does not exist

自闭症网瘾萝莉.ら 提交于 2020-01-01 06:34:52
问题 I'm trying to configure the AWS s3 filesystem on my Sonata-Project, but I always get the following error: The configured bucket "my-bucket" does not exist. My sonata_media.yml : cdn: server: path: http://%s3_bucket_name%.s3-website-%s3_region%.amazonaws.com providers: image: filesystem: sonata.media.filesystem.s3 file: resizer: false allowed_extensions: ['pdf'] allowed_mime_types: ['application/pdf', 'application/x-pdf'] filesystem: s3: bucket: %s3_bucket_name% accessKey: %s3_access_key%

SonataMediaBundle - S3 AWS: 'The configured bucket “my-bucket” does not exist

大城市里の小女人 提交于 2020-01-01 06:34:04
问题 I'm trying to configure the AWS s3 filesystem on my Sonata-Project, but I always get the following error: The configured bucket "my-bucket" does not exist. My sonata_media.yml : cdn: server: path: http://%s3_bucket_name%.s3-website-%s3_region%.amazonaws.com providers: image: filesystem: sonata.media.filesystem.s3 file: resizer: false allowed_extensions: ['pdf'] allowed_mime_types: ['application/pdf', 'application/x-pdf'] filesystem: s3: bucket: %s3_bucket_name% accessKey: %s3_access_key%

Symfony doctrine auto_mapping Unrecognized

孤者浪人 提交于 2019-12-29 05:46:46
问题 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" 回答1: You are mixing shortened and full configuration. If you just want to use the default entity manager then you can place

Custom Action leading to filtered list with multiple parameters?

寵の児 提交于 2019-12-25 09:25:28
问题 I need that my custom action button leads to a filtered Sonata List (Curriculum), but I need to use two parameters (Company and External). Previously, I have been using this approach: Sonata Admin Action Button to Pre Filtered List, but I couldn't manage to use two parameters at the same time. <a class="btn btn-sm btn-default" href="{{ path('admin_myvendor_mybundle_curriculum_list',{'filter[companies][value]' : object.id }) }}"><i class="fa fa-university"></i> Curriculums </a> Any idea how to

Custom Action leading to filtered list with multiple parameters?

家住魔仙堡 提交于 2019-12-25 09:21:01
问题 I need that my custom action button leads to a filtered Sonata List (Curriculum), but I need to use two parameters (Company and External). Previously, I have been using this approach: Sonata Admin Action Button to Pre Filtered List, but I couldn't manage to use two parameters at the same time. <a class="btn btn-sm btn-default" href="{{ path('admin_myvendor_mybundle_curriculum_list',{'filter[companies][value]' : object.id }) }}"><i class="fa fa-university"></i> Curriculums </a> Any idea how to

how to create custom list with sonata admin

為{幸葍}努か 提交于 2019-12-24 09:25:06
问题 I can't find (understand) how to add items and cathegories to Left Side Admin Menu. There is no detailed tutorial how to do this. I can add items to sonata.admin.block.admin_list but to aside Admin Menu enter image description here 回答1: Since the menu is automatically built by traversing the registered admins there is no (to me known) simple solution for that by adding just an admin service entry. But it's quite easy yet. You could register a MenuBuilderListener and add new items as many as

Upgrading Sonata from 2.3 to 3.0

别来无恙 提交于 2019-12-23 23:06:22
问题 I have an existing Symfony + SonataAdmin project which we've been running for a few years. I'd like to upgrade it to SonataAdmin 3.x. 3.0 would be a good start, then moving up to 3.x afterwards once we check it's all working. However, I can't seem to get a viable set of composer dependencies to upgrade. The current settings include: "sonata-project/admin-bundle": "~2.3", "sonata-project/core-bundle": "~2.3", "sonata-project/doctrine-orm-admin-bundle": "~2.3", "sonata-project/user-bundle": "~2

Use custom column in Sonata Admin list

泄露秘密 提交于 2019-12-23 19:46:11
问题 I created a project with Symfony 4.1, and install Sonata Admin Bundle. In a listing of my categories, I try to add a column which is not related to a field of Category So I did /* Admin/CategoryAdmin.php */ protected function configureListFields(ListMapper $listMapper) { $listMapper ->addIdentifier('name') ->add('test_column', 'string', [ 'template' => 'template_test.html.twig', ]); } And my template. {# templates/template_test.html.twig #} {% extends 'SonataAdminBundle:CRUD:base_list_field

Sonata admin enhanced view for security roles

落花浮王杯 提交于 2019-12-23 04:45:46
问题 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 admin is named as sonata.news.admin.post and for that service generated roles will look like ROLE_SONATA_NEWS_ADMIN_POST_EDIT ROLE_SONATA_NEWS_ADMIN_POST_LIST ROLE_SONATA_NEWS_ADMIN_POST_CREATE ROLE_SONATA_NEWS

Exporting one to many relationship on sonata admin

情到浓时终转凉″ 提交于 2019-12-22 07:13:12
问题 I have tried to search online for a definite solution to this question but there's really no concrete solution for newbies out there. I have an Entry which has many EntryListing. In my EntryAdmin listMapper, i comfortably can list entries by a statement as simple as ->add('listings') which simply returns the listings as defined in the EntryListing __toString() function. Is there a way to achieve the same when exporting the data by overiding the getExportFields() functions as below: public