SonataAdminBundle custom group icon - symfony

I'm using SonataAdminBundle to generate a CRUD for my Page entity.
With the yaml file bellow the menu is displayed in the sidebar.
I would like to change the group default icon which is "fa fa-folder".
But I don't find the option to do it.
sonata.admin.page:
class: FM\AppBundle\Admin\Page\Page
tags:
- { name: sonata.admin, manager_type: orm, group: "CMS", label: "Pages" }
arguments:
- ~
- FM\AppBundle\Entity\Page\Page
- ~

"icon" option:
icon: "<i class=\"fa fa-folder\"></i>"
In your example:
sonata.admin.page:
class: FM\AppBundle\Admin\Page\Page
tags:
- { name: sonata.admin, manager_type: orm, group: "CMS", label: "Pages", icon: "<i class=\"fa fa-folder\"></i>" }
arguments:
- ~
- FM\AppBundle\Entity\Page\Page
- ~

Related

Magnolia CMS Content App Multivalue and composite field error

I am facing weird issue when using multi value and composite field in content app data is not stored in JCR properly, when used transformer class no error appears but no data is saved.
Following is my light module editor section
editor:
class: info.magnolia.editor.app.ContentEditorSubAppDescriptor
actions:
close:
class: info.magnolia.editor.action.CloseContentEditorActionDefinition
save:
class: info.magnolia.editor.action.SaveContentActionDefinition
saveAndPublish:
class: info.magnolia.editor.action.SaveContentActionDefinition
onSuccessAction:
class: info.magnolia.ui.framework.action.ActivationActionDefinition
command: activate
contentConnector:
workspace: rules
$type: jcrDatasource
nodeTypes:
- icon: icon-node-content
name: mgnl:content
strict: false
- icon: icon-folder-l
name: mgnl:folder
strict: false
contentDefinition:
outlineFields:
jcrName:
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
required: true
styleName: title
range:
class: info.magnolia.editor.app.field.CollapsibleCompositeFieldDefinition
collapsed: true
fields:
- name: rangeList
fieldType: multiValue
transformerClass: info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueFieldTransformer
label: Range1
field:
name: rangeComponent
fieldType: composite
transformerClass: info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer
fields:
- name: title
fieldType: text
label: Title1
- name: title2
fieldType: text
label: Title2
equals:
class: info.magnolia.editor.app.field.CollapsibleCompositeFieldDefinition
name: equalList
collapsed: true
fields:
equals:
name: equalComponent
fieldType: multiValue
class: info.magnolia.ui.form.field.definition.MultiValueFieldDefinition
buttonSelectAddLabel: field.link.select.add
field:
name: equalElement
class: info.magnolia.ui.form.field.definition.TextFieldDefinition
fieldType: text
blocks:
- text
initialBlock: text
linkableApps:
- pages
- assets
Equal section is working as expected but range section with composite part is not storing data.
Maybe the problem is the transformerClass which you're using in multiValue field. Try with the DelegatingMultiValueSubnodeTransformer:
- name: rangeList
fieldType: multiValue
transformerClass: info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueSubnodeTransformer
label: Range1
field:
name: rangeComponent
fieldType: composite
transformerClass: info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer
fields:
- name: title
fieldType: text
label: Title1
- name: title2
fieldType: text
label: Title2
Hope it helps ;)

Symfony Sonata Admin - Security issue with Role and on_top

i got a problem with security and menu.
I have a menu point "Besuchsmanagement" set on_top: true
Now i have roles for this.
My problem is, that the on_top always be shown, if role is granted or not.
ROLES:
role_hierarchy:
ROLE_ADMIN_VISIT_READER:
- ROLE_ADMIN_VISIT_LIST
- ROLE_ADMIN_VISIT_VIEW
ROLE_ADMIN_VISIT_CREATOR:
- ROLE_ADMIN_VISIT_READER
- ROLE_ADMIN_VISIT_CREATE
- ROLE_ADMIN_VISIT_EDIT
ROLE_ADMIN_VISIT_ADMIN:
- ROLE_ADMIN_VISIT_ALL
ROLE_USER:
- ROLE_ADMIN_VISIT_ADMIN
services.yml
admin.visit:
class: ifabrik\VisitBundle\Admin\VisitAdmin
arguments: [~, ifabrik\VisitBundle\Entity\Visit, ~]
tags:
- { name: sonata.admin, group: Besuchsmanagement, manager_type: orm, on_top: true, icon: '<i class="fa fa-map-signs" aria-hidden="true"></i>' }
When i remove on_top - then roles are correct.
Instead of passing on_top in the service definition you should be configuring your admin menu in your app/config.yml.
Here is an example :
sonata_admin:
dashboard:
groups:
Customers Relationship Management:
label: libio.menu_label.crm
icon: '<i class="fa fa-address-card"></i>'
on_top: true
roles: [ROLE_SUPER_ADMIN]
items:
- route: admin_librinfo_crm_organism_list
label: libio.menu_label.organisms_list
As you can see you can specify the roles to wich the menu entry will be shown.
To find out the route execute the command
app/console (bin/console on sf3) debug:router

sonata don't show edit roules in dashboard

i'm a newbie of sonata, i configure in this way my config.yml
sonata_admin:
title: Name
templates:
layout: SonataAdminBundle::layout.html.twig
dashboard:
groups:
PartnerShop:
label: Partner Shop
icon: <i class="fa fa-car"></i>
items:
- admin.content
- admin.access
- admin.category
PagineComuni:
label: Pagine Comuni
icon: <i class="fa fa-bars"></i>
items:
- route: 'admin_app_comuni_edit'
route_params: { id: 1 }
label: Name
- route: 'admin_app_comuni_edit'
route_params: { id: 2 }
label: Brands
- route: 'admin_app_comuni_edit'
route_params: { id: 3 }
label: Gamma
- route: 'admin_app_comuni_edit'
route_params: { id: 4 }
label: Logistica
User:
label: Utenti
icon: <i class="fa fa-users"></i>
items:
- sonata.user.admin.user
- sonata.user.admin.group
roles: [ROLE_SUPER_ADMIN ]
in side menĂ¹ all it works, i see the correct list of admin, but in dashboard i see only the ParnerShop and User block, PagineComuni is not present
exist a way to display pagine comuni beetween ParnerShop and User?
thank you

Override Sonata Users services Menu Group

I make user of the Sonata User Bundle. According to the documentation under section 2.5 Extending the Bundle they want me to generate a complete new bundle for my user and group entities. I think this is completely unnecessary and I don't want that extra bundle. So I've created my User and Group entities in my AppBundle and I extend them from the Sonata\UserBundle\Entity\BaseUser entities.
After this, I've changed my fos_user user_class and group_class to my new entities.
fos_user:
db_driver: orm
firewall_name: main
user_class: AppBundle\Entity\User
group:
group_class: AppBundle\Entity\Group
group_manager: sonata.user.orm.group_manager
service:
user_manager: sonata.user.orm.user_manager
Everything works perfectly, my user and group tables in my database is generated correctly, I can create users through the fos user command line, and I can log in.
In the menu is an automatically generated user group that contain the user and group entities (see the image below). Now the only problem is to override the services for this entities to them to use my own entity classes, because when I click now on one of them they want the entities in the extended bundle that I don't want. How can I tell sonata to make use of my own services? Or even, how can I just remove or hide the Users (with Users and Groups) completely?
After some digging in Sonata User Bundle files, I see that the entities can be set with a parameter. So all I had to do was to add;
parameters:
sonata.user.admin.user.entity: AppBundle\Entity\User
sonata.user.admin.group.entity: AppBundle\Entity\Group
in my config.yml file.
"Or even, how can I just remove or hide the Users (with Users and Groups) completely?"
So, we have SonataUserBundle and our AppBundle.
In both of them we have User and Group Entity. And we don't want to use entities from sonata - we just extend them. But SonataUserBundle has already had the UserAdmin and GroupAdmin classes inside.
That's why, after installing SonataUserBundle in the admin menu appear two services:
As you know, every sonata admin class we declare in the services.yml file.
In SonataUserBundle we have another files, which sonata developers declare services in. In case of using doctrine orm we should look at admin_orm.xml file, which lies in this path:
vendor/sonata-project/user-bundle/Resources/config/admin_orm.xml
Inside the file we can find the declaration of the admin services - UserAdmin and GroupAdmin:
<?xml version="1.0" encoding="UTF-8"?>
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="sonata.user.admin.groupname">sonata_user</parameter>
<parameter key="sonata.user.admin.label_catalogue">SonataUserBundle</parameter>
<parameter key="sonata.user.admin.groupicon"><![CDATA[<i class='fa fa-users'></i>]]></parameter>
</parameters>
<services>
<service id="sonata.user.admin.user" class="%sonata.user.admin.user.class%">
<tag name="sonata.admin" manager_type="orm" group="%sonata.user.admin.groupname%" label="users" label_catalogue="%sonata.user.admin.label_catalogue%" label_translator_strategy="sonata.admin.label.strategy.underscore" icon="%sonata.user.admin.groupicon%"/>
<argument/>
<argument>%sonata.user.admin.user.entity%</argument>
<argument>%sonata.user.admin.user.controller%</argument>
<call method="setUserManager">
<argument type="service" id="fos_user.user_manager"/>
</call>
<call method="setTranslationDomain">
<argument>%sonata.user.admin.user.translation_domain%</argument>
</call>
</service>
<service id="sonata.user.admin.group" class="%sonata.user.admin.group.class%">
<tag name="sonata.admin" manager_type="orm" group="%sonata.user.admin.groupname%" label="groups" label_catalogue="%sonata.user.admin.label_catalogue%" label_translator_strategy="sonata.admin.label.strategy.underscore"/>
<argument/>
<argument>%sonata.user.admin.group.entity%</argument>
<argument>%sonata.user.admin.group.controller%</argument>
<call method="setTranslationDomain">
<argument>%sonata.user.admin.group.translation_domain%</argument>
</call>
</service>
</services>
As you can see here the ids of our services:
sonata.user.admin.user
sonata.user.admin.group
The simplest method to overwrite them is to create the same services (I mean we will use this ids ) in our services.yml file.
Yes, you can have an argument with me, that this method is stupid, but as I said it's not the only one.
So Sonata services in OUR services.yml will looks like this:
sonata.user.admin.user:
class: "%sonata.user.admin.user.class%"
arguments: [~, "%sonata.user.admin.user.entity%", "%sonata.user.admin.user.controller%"]
tags:
- { name: sonata.admin, manager_type: orm, group: "%sonata.user.admin.groupname%", label_catalogue: "%sonata.user.admin.label_catalogue%", label: "users", icon: "<i class=\"fa fa-users\"></i>" }
calls:
- [ setUserManager, [ "#fos_user.user_manager" ] ]
- [ setTranslationDomain, [ "%sonata.user.admin.user.translation_domain%" ] ]
sonata.user.admin.group:
class: "%sonata.user.admin.group.class%"
arguments: [~, "%sonata.user.admin.group.entity%", "%sonata.user.admin.group.controller%"]
tags:
- { name: sonata.admin, manager_type: orm, group: "%sonata.user.admin.groupname%", label_catalogue: "%sonata.user.admin.label_catalogue%", label: "groups" }
calls:
- [ setTranslationDomain, [ "%sonata.user.admin.group.translation_domain%" ] ]
Now you can update the admin dashboard and see, that nothing have happened. But the our purpose was to disable this service from our dashboard and menu. Let's do the trick. Add
show_in_dashboard: false
tags:
- { show_in_dashboard: false, name: sonata.admin, manager_type: orm, group: "%sonata.user.admin.groupname%", label_catalogue: "%sonata.user.admin.label_catalogue%", label: "users", icon: "<i class=\"fa fa-user\"></i>" }
to the declaration of this service in services.yml.
Therefore our services will look like this:
sonata.user.admin.user:
class: "%sonata.user.admin.user.class%"
arguments: [~, "%sonata.user.admin.user.entity%", "%sonata.user.admin.user.controller%"]
tags:
- { name: sonata.admin, manager_type: orm, group: "%sonata.user.admin.groupname%", label_catalogue: "%sonata.user.admin.label_catalogue%", label: "users", icon: "<i class=\"fa fa-user\"></i>", show_in_dashboard: false }
calls:
- [ setUserManager, [ "#fos_user.user_manager" ] ]
- [ setTranslationDomain, [ "%sonata.user.admin.user.translation_domain%" ] ]
sonata.user.admin.group:
class: "%sonata.user.admin.group.class%"
arguments: [~, "%sonata.user.admin.group.entity%", "%sonata.user.admin.group.controller%"]
tags:
- { name: sonata.admin, manager_type: orm, group: "%sonata.user.admin.groupname%", label_catalogue: "%sonata.user.admin.label_catalogue%", label: "groups", show_in_dashboard: false }
calls:
- [ setTranslationDomain, [ "%sonata.user.admin.group.translation_domain%" ] ]
After this trivial manipulations Sonata services will completely disappear from your Dashboard.

SonataUserBundle : try to go /profile => route "sonata_customer_addresses" does not exist

I can't figured out why I have this error.
Herewith more informations abour my problem :
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "sonata_customer_addresses" as such route does not exist.") in SonataUserBundle:Profile:action.html.twig at line 27.
to implement my own User Class.
I use Symfony 2.4 with dev-master SonataAdminBundle and SonataUserBundle. I try
you can find my config.yml :
sonata_user:
security_acl: true
manager_type: orm
profile:
# Profile show page is a dashboard as in SonataAdminBundle
dashboard:
blocks:
- { position: left, type: sonata.block.service.text, settings: { content: "<h2>Welcome!</h2> This is a sample user profile dashboard, feel free to override it in the configuration! Want to make this text dynamic? For instance display the user's name? Create a dedicated block and edit the configuration!"} }
- { position: left, type: sonata.order.block.recent_orders, settings: { title: Recent Orders, number: 5, mode: public }}
- { position: right, type: sonata.timeline.block.timeline, settings: { max_per_page: 15 }}
- { position: right, type: sonata.news.block.recent_posts, settings: { title: Recent Posts, number: 5, mode: public }}
- { position: right, type: sonata.news.block.recent_comments, settings: { title: Recent Comments, number: 5, mode: public }}
# Customize user portal menu by setting links
menu:
- { route: 'sonata_user_profile_show', label: 'sonata_profile_title', domain: 'SonataUserBundle'}
- { route: 'sonata_user_profile_edit', label: 'link_edit_profile', domain: 'SonataUserBundle'}
- { route: 'sonata_customer_addresses', label: 'link_list_addresses', domain: 'SonataCustomerBundle'}
- { route: 'sonata_user_profile_edit_authentication', label: 'link_edit_authentication', domain: 'SonataUserBundle'}
- { route: 'sonata_order_index', label: 'order_list', domain: 'SonataOrderBundle'}
#sonata_admin:
# templates:
# dashboard: SonataAdminBundle:Core:dashboard.html.twig
sonata_admin:
title: Admin Panel
title_logo: /bundles/sonataadmin/logo_title.png
templates:
# default global templates
layout: SonataAdminBundle::standard_layout.html.twig
ajax: SonataAdminBundle::ajax_layout.html.twig
# default actions templates, should extend a global templates
list: SonataAdminBundle:CRUD:list.html.twig
show: SonataAdminBundle:CRUD:show.html.twig
edit: SonataAdminBundle:CRUD:edit.html.twig
dashboard:
blocks:
# display a dashboard block
- { position: left, type: sonata.admin.block.admin_list }
sonata_block:
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.user.block.menu:
sonata.user.block.account:
sonata.block.service.text:
sonata.block.service.action:
sonata.block.service.rss:
sonata_doctrine_orm_admin:
# default value is null, so doctrine uses the value defined in the configuration
entity_manager: ~
templates:
form:
- SonataDoctrineORMAdminBundle:Form:form_admin_fields.html.twig
filter:
- SonataDoctrineORMAdminBundle:Form:filter_admin_fields.html.twig
types:
list:
array: SonataAdminBundle:CRUD:list_array.html.twig
boolean: SonataAdminBundle:CRUD:list_boolean.html.twig
date: SonataAdminBundle:CRUD:list_date.html.twig
time: SonataAdminBundle:CRUD:list_time.html.twig
datetime: SonataAdminBundle:CRUD:list_datetime.html.twig
text: SonataAdminBundle:CRUD:base_list_field.html.twig
trans: SonataAdminBundle:CRUD:list_trans.html.twig
string: SonataAdminBundle:CRUD:base_list_field.html.twig
smallint: SonataAdminBundle:CRUD:base_list_field.html.twig
bigint: SonataAdminBundle:CRUD:base_list_field.html.twig
integer: SonataAdminBundle:CRUD:base_list_field.html.twig
decimal: SonataAdminBundle:CRUD:base_list_field.html.twig
identifier: SonataAdminBundle:CRUD:base_list_field.html.twig
show:
array: SonataAdminBundle:CRUD:show_array.html.twig
boolean: SonataAdminBundle:CRUD:show_boolean.html.twig
date: SonataAdminBundle:CRUD:show_date.html.twig
time: SonataAdminBundle:CRUD:show_time.html.twig
datetime: SonataAdminBundle:CRUD:show_datetime.html.twig
text: SonataAdminBundle:CRUD:base_show_field.html.twig
trans: SonataAdminBundle:CRUD:show_trans.html.twig
string: SonataAdminBundle:CRUD:base_show_field.html.twig
smallint: SonataAdminBundle:CRUD:base_show_field.html.twig
bigint: SonataAdminBundle:CRUD:base_show_field.html.twig
integer: SonataAdminBundle:CRUD:base_show_field.html.twig
decimal: SonataAdminBundle:CRUD:base_show_field.html.twig
# Doctrine Configuration
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
types:
json: Sonata\Doctrine\Types\JsonType
# if using pdo_sqlite as your database driver, add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# path: "%database_path%"
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
fos_user:
db_driver: orm
firewall_name: main
user_class: MyProject\UserBundle\Entity\User
group:
group_class: MyProject\UserBundle\Entity\Group
group_manager: sonata.user.orm.group_manager
service:
user_manager: sonata.user.orm.user_manager
and my routing.yml here :
sonata_user_security:
resource: "#SonataUserBundle/Resources/config/routing/sonata_security_1.xml"
sonata_user_resetting:
resource: "#SonataUserBundle/Resources/config/routing/sonata_resetting_1.xml"
prefix: /resetting
sonata_user_profile:
resource: "#SonataUserBundle/Resources/config/routing/sonata_profile_1.xml"
prefix: /profile
sonata_user_register:
resource: "#SonataUserBundle/Resources/config/routing/sonata_registration_1.xml"
prefix: /register
sonata_user_change_password:
resource: "#SonataUserBundle/Resources/config/routing/sonata_change_password_1.xml"
prefix: /profile
sonata_user:
resource: '#SonataUserBundle/Resources/config/routing/admin_security.xml'
prefix: /admin
admin:
resource: '#SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
prefix: /admin
_sonata_admin:
resource: .
type: sonata_admin
prefix: /admin
EDIT 1:
[router] Current routes
Name Method Scheme Host Path
_assetic_bootstrap_css ANY ANY ANY /assetic/bootstrap_css.less
_assetic_bootstrap_css_0 ANY ANY ANY /assetic/bootstrap_css_bootstrap_1.less
_assetic_jquery ANY ANY ANY /js/jquery.js
_assetic_jquery_0 ANY ANY ANY /js/jquery_jquery-2.1.1_1.js
_assetic_bootstrap_js ANY ANY ANY /js/bootstrap.js
_assetic_bootstrap_js_0 ANY ANY ANY /js/bootstrap_transition_1.js
_assetic_bootstrap_js_1 ANY ANY ANY /js/bootstrap_alert_2.js
_assetic_bootstrap_js_2 ANY ANY ANY /js/bootstrap_button_3.js
_assetic_bootstrap_js_3 ANY ANY ANY /js/bootstrap_carousel_4.js
_assetic_bootstrap_js_4 ANY ANY ANY /js/bootstrap_collapse_5.js
_assetic_bootstrap_js_5 ANY ANY ANY /js/bootstrap_dropdown_6.js
_assetic_bootstrap_js_6 ANY ANY ANY /js/bootstrap_modal_7.js
_assetic_bootstrap_js_7 ANY ANY ANY /js/bootstrap_tooltip_8.js
_assetic_bootstrap_js_8 ANY ANY ANY /js/bootstrap_popover_9.js
_assetic_bootstrap_js_9 ANY ANY ANY /js/bootstrap_scrollspy_10.js
_assetic_bootstrap_js_10 ANY ANY ANY /js/bootstrap_tab_11.js
_assetic_bootstrap_js_11 ANY ANY ANY /js/bootstrap_affix_12.js
_assetic_a56fa94 ANY ANY ANY /js/a56fa94.js
_assetic_a56fa94_0 ANY ANY ANY /js/a56fa94_part_1.js
_assetic_a56fa94_1 ANY ANY ANY /js/a56fa94_part_2.js
_assetic_65cec74 ANY ANY ANY /css/65cec74.css
_wdt ANY ANY ANY /_wdt/{token}
_profiler_home ANY ANY ANY /_profiler/
_profiler_search ANY ANY ANY /_profiler/search
_profiler_search_bar ANY ANY ANY /_profiler/search_bar
_profiler_purge ANY ANY ANY /_profiler/purge
_profiler_info ANY ANY ANY /_profiler/info/{about}
_profiler_import ANY ANY ANY /_profiler/import
_profiler_export ANY ANY ANY /_profiler/export/{token}.txt
_profiler_phpinfo ANY ANY ANY /_profiler/phpinfo
_profiler_search_results ANY ANY ANY /_profiler/{token}/search/results
_profiler ANY ANY ANY /_profiler/{token}
_profiler_router ANY ANY ANY /_profiler/{token}/router
_profiler_exception ANY ANY ANY /_profiler/{token}/exception
_profiler_exception_css ANY ANY ANY /_profiler/{token}/exception.css
_configurator_home ANY ANY ANY /_configurator/
_configurator_step ANY ANY ANY /_configurator/step/{index}
_configurator_final ANY ANY ANY /_configurator/final
fos_user_security_login ANY ANY ANY /login
fos_user_security_check POST ANY ANY /login_check
fos_user_security_logout ANY ANY ANY /logout
sonata_user_security_login ANY ANY ANY /login
sonata_user_security_check POST ANY ANY /login_check
sonata_user_security_logout ANY ANY ANY /logout
fos_user_resetting_request GET ANY ANY /resetting/request
fos_user_resetting_send_email POST ANY ANY /resetting/send-email
fos_user_resetting_check_email GET ANY ANY /resetting/check-email
fos_user_resetting_reset GET|POST ANY ANY /resetting/reset/{token}
sonata_user_resetting_request GET ANY ANY /resetting/request
sonata_user_resetting_send_email POST ANY ANY /resetting/send-email
sonata_user_resetting_check_email GET ANY ANY /resetting/check-email
sonata_user_resetting_reset GET|POST ANY ANY /resetting/reset/{token}
fos_user_profile_show GET ANY ANY /profile/
fos_user_profile_edit_authentication ANY ANY ANY /profile/edit-authentication
fos_user_profile_edit ANY ANY ANY /profile/edit-profile
sonata_user_profile_show GET ANY ANY /profile/
sonata_user_profile_edit_authentication ANY ANY ANY /profile/edit-authentication
sonata_user_profile_edit ANY ANY ANY /profile/edit-profile
fos_user_registration_register ANY ANY ANY /register/
fos_user_registration_check_email GET ANY ANY /register/check-email
fos_user_registration_confirm GET ANY ANY /register/confirm/{token}
fos_user_registration_confirmed GET ANY ANY /register/confirmed
sonata_user_registration_register ANY ANY ANY /register/
sonata_user_registration_check_email GET ANY ANY /register/check-email
sonata_user_registration_confirm GET ANY ANY /register/confirm/{token}
sonata_user_registration_confirmed GET ANY ANY /register/confirmed
fos_user_change_password GET|POST ANY ANY /profile/change-password
sonata_user_change_password GET|POST ANY ANY /profile/change-password
sonata_user_admin_security_login ANY ANY ANY /admin/login
sonata_user_admin_security_check ANY ANY ANY /admin/login_check
sonata_user_admin_security_logout ANY ANY ANY /admin/logout
sonata_admin_redirect ANY ANY ANY /admin/
sonata_admin_dashboard ANY ANY ANY /admin/dashboard
sonata_admin_retrieve_form_element ANY ANY ANY /admin/core/get-form-field-element
sonata_admin_append_form_element ANY ANY ANY /admin/core/append-form-field-element
sonata_admin_short_object_information ANY ANY ANY /admin/core/get-short-object-description.{_format}
sonata_admin_set_object_field_value ANY ANY ANY /admin/core/set-object-field-value
sonata_admin_search ANY ANY ANY /admin/search
sonata_admin_retrieve_autocomplete_items ANY ANY ANY /admin/core/get-autocomplete-items
admin_sonata_user_user_list ANY ANY ANY /admin/sonata/user/user/list
admin_sonata_user_user_create ANY ANY ANY /admin/sonata/user/user/create
admin_sonata_user_user_batch ANY ANY ANY /admin/sonata/user/user/batch
admin_sonata_user_user_edit ANY ANY ANY /admin/sonata/user/user/{id}/edit
admin_sonata_user_user_delete ANY ANY ANY /admin/sonata/user/user/{id}/delete
admin_sonata_user_user_show ANY ANY ANY /admin/sonata/user/user/{id}/show
admin_sonata_user_user_export ANY ANY ANY /admin/sonata/user/user/export
admin_sonata_user_group_list ANY ANY ANY /admin/sonata/user/group/list
admin_sonata_user_group_create ANY ANY ANY /admin/sonata/user/group/create
admin_sonata_user_group_batch ANY ANY ANY /admin/sonata/user/group/batch
admin_sonata_user_group_edit ANY ANY ANY /admin/sonata/user/group/{id}/edit
admin_sonata_user_group_delete ANY ANY ANY /admin/sonata/user/group/{id}/delete
admin_sonata_user_group_show ANY ANY ANY /admin/sonata/user/group/{id}/show
admin_sonata_user_group_export ANY ANY ANY /admin/sonata/user/group/export
myproject_user_default_index ANY ANY ANY /hello/{name}
myproject_comment_default_index ANY ANY ANY /hello/{name}
myproject_provider_default_index ANY ANY ANY /hello/{name}
myproject_provider_providersearch_index ANY ANY ANY /ProviderSearch
myproject_service_default_index ANY ANY ANY /hello/{name}
myproject_geo_default_index ANY ANY ANY /hello/{name}
myproject_schedule_default_index ANY ANY ANY /hello/{name}
myproject_coupon_couponsearch_index ANY ANY ANY /couponSearch
my_filter ANY ANY ANY /filter/
myproject_coupon_default_index ANY ANY ANY /coupon
myproject_association_search ANY ANY ANY /associationSearch
myproject_association_search_result ANY ANY ANY /associationSearch/result
myproject_association_search_show ANY ANY ANY /association/{slug}
myproject_contact ANY ANY ANY /contact
myproject_core_homepage ANY ANY ANY /
myproject_city_typeahead ANY ANY ANY /autocompleteCity
myproject_assoName_typeahead ANY ANY ANY /autocompleteAssoName
myproject_providerName_typeahead ANY ANY ANY /autocompleteProviderName
myproject_core_static ANY ANY ANY /{page}
myproject_coupon ANY ANY ANY /coupon
myproject_coupon_search ANY ANY ANY /couponSearch
myproject_coupon_search_result ANY ANY ANY /couponSearch/result
myproject_provider_search_show ANY ANY ANY /provider/{slug}
fos_js_routing_js ANY ANY ANY /js/routing.{_format}
Ok I finally got a dashboard by removing all in sonata_user like this :
sonata_user:
security_acl: true
manager_type: orm
I try to get a Dashboard like in this documentation : http://sonata-project.org/bundles/user/2-2/doc/reference/user_dashboard.html without success.
I have a blank page now, I will do all dashboard on my own,I can't see other way...
You should copy paste the code from the inatallation documentation into config.yml (like me).
Remove the lines with sonata_customer and sonata_order.
profile:
# Profile show page is a dashboard as in SonataAdminBundle
dashboard:
blocks:
- { position: left, type: sonata.block.service.text, settings: { content: "<h2>Welcome!</h2> This is a sample user profile dashboard, feel free to override it in the configuration! Want to make this text dynamic? For instance display the user's name? Create a dedicated block and edit the configuration!"} }
- { position: left, type: sonata.order.block.recent_orders, settings: { title: Recent Orders, number: 5, mode: public }}
- { position: right, type: sonata.timeline.block.timeline, settings: { max_per_page: 15 }}
- { position: right, type: sonata.news.block.recent_posts, settings: { title: Recent Posts, number: 5, mode: public }}
- { position: right, type: sonata.news.block.recent_comments, settings: { title: Recent Comments, number: 5, mode: public }}
# Customize user portal menu by setting links
menu:
- { route: 'sonata_user_profile_show', label: 'sonata_profile_title', domain: 'SonataUserBundle'}
- { route: 'sonata_user_profile_edit', label: 'link_edit_profile', domain: 'SonataUserBundle'}
- { route: 'sonata_customer_addresses', label: 'link_list_addresses', domain: 'SonataCustomerBundle'}
- { route: 'sonata_user_profile_edit_authentication', label: 'link_edit_authentication', domain: 'SonataUserBundle'}
- { route: 'sonata_order_index', label: 'order_list', domain: 'SonataOrderBundle'}

Resources