protected function getFailureFunction(User $user)
{
$that = $this;
return function ($form, Calendar $calendar, $isNew) use($user, $that) {
return $this->render('BaikalFrontendBundle:Calendar:form.html.twig', array('form' => $form->createView(), 'user' => $user, 'calendar' => $calendar));
};
}