Baikal\FrontendBundle\Controller\Calendar\FormController::getSuccessFunction PHP Метод

getSuccessFunction() защищенный Метод

protected getSuccessFunction ( Baikal\SystemBundle\Entity\User $user )
$user Baikal\SystemBundle\Entity\User
    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'));
        };
    }