public function storeAction(NotificationConfiguration $notificationConfiguration, Request $request)
 {
     $this->assertUserRights(UserRole::ROLE_ADMIN);
     if ($request->get('notify_all') === "true") {
         $notificationConfiguration->setNotifyAll(true);
         $notificationConfiguration->clearConnectedTools();
     } else {
         $notificationConfiguration->setNotifyAll(false);
         $notificationConfiguration->clearConnectedTools();
         foreach ($request->get('tools') as $toolId => $value) {
             $tool = $this->getDoctrine()->getRepository('BauerIncidentDashboardCoreBundle:Tool')->find((int) $toolId);
             /** @var Tool $tool */
             if ($tool->getProject() == $this->getProject()) {
                 $notificationConfiguration->addConnectedTool($tool);
             }
         }
     }
     $em = $this->getDoctrine()->getManager();
     $em->persist($notificationConfiguration);
     $em->flush();
     return $this->redirectToRoute('whm_notification_engine_alerts_home', ['project' => $this->getProject()->getIdentifier()]);
 }