April 2016
Intermediate to advanced
290 pages
5h 51m
English
One useful configuration feature that can be used in the service settings is a tag. It does not alter a service in any way, rather it provides properties that can be used in services for better organization.
For example, open the services.yml file in AppBundle and look at the configuration that SonataUserBundle creates to address the user profile edit form:
services:
mava_user.profile.form.type:
class: AppBundle\Form\ProfileType
tags:
- { name: form.type, alias: mava_user_profile }Now open the
config.yml file and scroll down to sonata_user:
sonata_user:
security_acl: true
manager_type: orm
profile:
form:
type: mava_user_profile
As you can see, Sonata uses tags to address the Profile Edit form for users. In other words, ...