add a ScopePickerType and a UserPickerType

Those type allow easily to

- pick a Scope/circle in form
- pick a user in form
This commit is contained in:
2017-04-25 17:29:25 +02:00
parent b038cdfdf5
commit 95145171da
10 changed files with 292 additions and 1 deletions

View File

@@ -89,5 +89,24 @@ services:
chill.main.form.date_type:
class: Chill\MainBundle\Form\Type\ChillDateType
tags:
- { name: form.type }
chill.main.form.pick_user_type:
class: Chill\MainBundle\Form\Type\UserPickerType
arguments:
- "@chill.main.security.authorization.helper"
- "@security.token_storage"
- "@chill.main.user_repository"
tags:
- { name: form.type }
chill.main.form.pick_scope_type:
class: Chill\MainBundle\Form\Type\ScopePickerType
arguments:
- "@chill.main.security.authorization.helper"
- "@security.token_storage"
- "@chill.main.scope_repository"
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type }

View File

@@ -10,3 +10,9 @@ services:
factory: ["@doctrine.orm.entity_manager", getRepository]
arguments:
- "Chill\\MainBundle\\Entity\\User"
chill.main.scope_repository:
class: Doctrine\ORM\EntityRepository
factory: ["@doctrine.orm.entity_manager", getRepository]
arguments:
- "Chill\\MainBundle\\Entity\\Scope"