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($that->generateUrl('baikal_frontend_calendar_list'));
};
}