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())));
};
}