/**
  * Creates a new TipoServicio entity.
  *
  */
 public function createAction(Request $request)
 {
     $entity = new TipoServicio();
     $entity->setActivo(1);
     $form = $this->createCreateForm($entity);
     $form->handleRequest($request);
     if ($form->isValid()) {
         $em = $this->getDoctrine()->getManager();
         $em->persist($entity);
         try {
             $em->flush();
             $this->get('session')->getFlashBag()->add('notice', 'Los cambios fueron actualizados.');
         } catch (\Exception $e) {
             $this->get('session')->getFlashBag()->add('error', 'El tipo de servicio no pudo ser insertado. Ya existe un registro con ese nombre.');
         }
         return $this->redirect($this->generateUrl('administracion_tiposervicio', array('id' => $entity->getId())));
     }
     return $this->render('sisconeeAdministracionBundle:TipoServicio:new.html.twig', array('entity' => $entity, 'form' => $form->createView()));
 }
 /**
  * {@inheritDoc}
  */
 public function getServicios()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getServicios', array());
     return parent::getServicios();
 }