|
@@ 99-114 (lines=16) @@
|
| 96 |
|
); |
| 97 |
|
|
| 98 |
|
// @todo move this in an event! |
| 99 |
|
if (array_key_exists( |
| 100 |
|
'SumoCodersFrameworkSearchBundle', |
| 101 |
|
$this->container->getParameter('kernel.bundles') |
| 102 |
|
) |
| 103 |
|
) { |
| 104 |
|
$searchIndexItems = \SumoCoders\FrameworkSearchBundle\Entity\IndexItem::createMultipleObjectsBasedOnProperties( |
| 105 |
|
'SumoCoders\FrameworkUserBundle\Entity\User', |
| 106 |
|
$user->getId(), |
| 107 |
|
array('username', 'email'), |
| 108 |
|
$user |
| 109 |
|
); |
| 110 |
|
|
| 111 |
|
$event = new \SumoCoders\FrameworkSearchBundle\Event\IndexUpdateEvent(); |
| 112 |
|
$event->setObjects($searchIndexItems); |
| 113 |
|
$this->get('event_dispatcher')->dispatch('framework_search.index_update', $event); |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
return $this->redirect( |
| 117 |
|
$this->generateUrl( |
|
@@ 201-216 (lines=16) @@
|
| 198 |
|
$user = $form->getData(); |
| 199 |
|
$userManager->updateUser($user); |
| 200 |
|
|
| 201 |
|
if (array_key_exists( |
| 202 |
|
'SumoCodersFrameworkSearchBundle', |
| 203 |
|
$this->container->getParameter('kernel.bundles') |
| 204 |
|
) |
| 205 |
|
) { |
| 206 |
|
$searchIndexItems = \SumoCoders\FrameworkSearchBundle\Entity\IndexItem::createMultipleObjectsBasedOnProperties( |
| 207 |
|
'SumoCoders\FrameworkUserBundle\Entity\User', |
| 208 |
|
$user->getId(), |
| 209 |
|
array('username', 'email'), |
| 210 |
|
$user |
| 211 |
|
); |
| 212 |
|
|
| 213 |
|
$event = new \SumoCoders\FrameworkSearchBundle\Event\IndexUpdateEvent(); |
| 214 |
|
$event->setObjects($searchIndexItems); |
| 215 |
|
$this->get('event_dispatcher')->dispatch('framework_search.index_update', $event); |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
$session->getFlashBag()->add( |
| 219 |
|
'success', |