示例#1
0
 private function preparePositionForm($name)
 {
     $form = new PositionForm($this, $name, $this->getTranslator());
     $roles = $this->roleService->getSelectRoles();
     $users = $this->userService->getSelectUsers();
     $groups = $this->sportGroupService->getSelectAllSportGroups();
     $form->setSportGroups($groups);
     $form->setRoles($roles);
     $form->setUsers($users);
     return $form;
 }
示例#2
0
 private function prepareArticleForm($name)
 {
     $form = new ArticleForm($this, $name, $this->getTranslator());
     try {
         $users = $this->usersService->getSelectUsers();
         $form->setUsers($users);
         $sGroups = $this->sportGroupService->getSelectAllSportGroups();
         $form->setSportGroups($sGroups);
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataLoad(null, "default", $ex);
     }
     return $form;
 }
示例#3
0
 public function prepareEventForm($name)
 {
     $form = new EventForm($this, $name, $this->getTranslator());
     try {
         $groups = $this->sportGroupsService->getSelectAllSportGroups();
         $form->setSportGroups($groups);
         $users = $this->userService->getSelectUsers();
         $form->setUsers($users);
     } catch (\Exception $ex) {
         $this->handleDataLoad(null, "default", $ex);
     }
     return $form;
 }
示例#4
0
 private function prepareStaticPageForm($name, $selfId = null)
 {
     $form = new StaticPageForm($this, $name, $this->getTranslator());
     try {
         $sportGroups = $this->sportGroupService->getSelectAllSportGroups($selfId);
         $form->setSportGroups($sportGroups);
         $users = $this->userService->getSelectUsers();
         $form->setUsers($users);
         $pages = $this->staticPageService->getSelectStaticPages($selfId);
         $form->setPages($pages);
     } catch (Exceptions\DataErrorException $ex) {
         $this->flashMessage($ex->getMessage(), self::FM_ERROR);
     }
     return $form;
 }