Ejemplo n.º 1
0
 protected function getSuccessFunction(User $user)
 {
     $that = $this;
     return function ($form, Calendar $calendar, $isNew) use($user, $that) {
         $that->get('session')->getFlashBag()->add('notice', 'Calendar <i class="fa fa-calendar"></i> <strong>' . htmlspecialchars($calendar->getDisplayname()) . '</strong> has been ' . ($isNew ? 'created' : 'updated') . '.');
         return $that->redirect($this->generateUrl('baikal_admin_user_calendar_list', array('id' => $user->getId())));
     };
 }
Ejemplo n.º 2
0
 public function deleteAction(User $user, Addressbook $addressbook)
 {
     $em = $this->getDoctrine()->getManager();
     $em->remove($addressbook);
     $em->flush();
     $this->get('session')->getFlashBag()->add('notice', 'Addressbook <i class="fa fa-book"></i> <strong>' . htmlspecialchars($addressbook->getDisplayname()) . '</strong> has been deleted.');
     return $this->redirect($this->generateUrl('baikal_admin_user_addressbook_list', array('id' => $user->getId())));
 }