@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | |
33 | 33 | return array( |
34 | 34 | 'entity' => User::clazz(), |
35 | - 'create_default_data_mapper' => function (ContainerInterface $container) { |
|
35 | + 'create_default_data_mapper' => function(ContainerInterface $container) { |
|
36 | 36 | return $this->container->get('modera_backend_security.data_mapper.user_data_mapper'); |
37 | 37 | }, |
38 | 38 | 'security' => array( |
39 | 39 | 'actions' => array( |
40 | 40 | 'create' => ModeraBackendSecurityBundle::ROLE_MANAGE_USER_PROFILES, |
41 | - 'update' => function (AuthorizationCheckerInterface $ac, array $params) use ($self) { |
|
41 | + 'update' => function(AuthorizationCheckerInterface $ac, array $params) use ($self) { |
|
42 | 42 | /* @var TokenStorageInterface $ts */ |
43 | 43 | $ts = $self->get('security.token_storage'); |
44 | 44 | /* @var User $user */ |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | 'hydration' => array( |
61 | 61 | 'groups' => array( |
62 | 62 | 'main-form' => ['id', 'username', 'email', 'firstName', 'lastName', 'middleName', 'meta'], |
63 | - 'list' => function (User $user) { |
|
63 | + 'list' => function(User $user) { |
|
64 | 64 | $groups = array(); |
65 | 65 | foreach ($user->getGroups() as $group) { |
66 | 66 | $groups[] = $group->getName(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | 'meta' => $user->getMeta(), |
80 | 80 | ); |
81 | 81 | }, |
82 | - 'compact-list' => function (User $user) { |
|
82 | + 'compact-list' => function(User $user) { |
|
83 | 83 | $groups = array(); |
84 | 84 | foreach ($user->getGroups() as $group) { |
85 | 85 | $groups[] = $group->getName(); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | 'modera-backend-security-group-groupusers' => HydrationProfile::create(false)->useGroups(array('compact-list')), |
104 | 104 | ), |
105 | 105 | ), |
106 | - 'map_data_on_create' => function (array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
106 | + 'map_data_on_create' => function(array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
107 | 107 | $defaultMapper->mapData($params, $entity); |
108 | 108 | |
109 | 109 | if (isset($params['plainPassword']) && $params['plainPassword']) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $mailService->sendPassword($entity, $plainPassword); |
120 | 120 | } |
121 | 121 | }, |
122 | - 'map_data_on_update' => function (array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
122 | + 'map_data_on_update' => function(array $params, User $entity, DataMapperInterface $defaultMapper, ContainerInterface $container) use ($self) { |
|
123 | 123 | $defaultMapper->mapData($params, $entity); |
124 | 124 | |
125 | 125 | /* @var LoggerInterface $activityMgr */ |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $activityMgr->info($activityMsg, $activityContext); |
170 | 170 | } |
171 | 171 | }, |
172 | - 'remove_entities_handler' => function ($entities, $params, $defaultHandler, ContainerInterface $container) { |
|
172 | + 'remove_entities_handler' => function($entities, $params, $defaultHandler, ContainerInterface $container) { |
|
173 | 173 | /* @var UserService $userService */ |
174 | 174 | $userService = $container->get('modera_security.service.user_service'); |
175 | 175 |