Пример #1
0
 /**
  * @return Registration
  */
 public function getCurrentRegistration()
 {
     $user = $this->getUser();
     $registration = $this->container->get('ritsiga.repository.registration')->findOneBy(['user' => $user]);
     if (!$registration) {
         $convention = $this->getCurrentSite();
         $registration = new Registration();
         $registration->setConvention($convention);
         $registration->setUser($user);
         $registration->setTaxdata(TaxData::copyFromUniversity($this->getUser()->getUniversity()));
     }
     return $registration;
 }