Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function batchActionAddToCollection(ProxyQueryInterface $selectedModelQuery)
- {
- $request = $this->get('request');
- $group = $this
- ->getDoctrine()
- ->getRepository('VelvelZDFBundle:Group')
- ->find($request->request->get('secondary'));
- $users = $selectedModelQuery->execute();
- foreach ($users as $user)
- {
- $group->addUser($user);
- }
- $this
- ->getDoctrine()
- ->getManager()
- ->flush();
- $this
- ->get('session')
- ->setFlash('sonata_flash_success', 'flash_batch_merge_success');
- return new RedirectResponse($this->admin->generateUrl('list', $this->admin->getFilterParameters()));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement