コード例 #1
0
 private function entrySeasonTypeHandle(MotivationEntry $t)
 {
     if ($t == null) {
         throw new Exceptions\NullPointerException("Argument MotivationTax cannot be null");
     }
     try {
         $season = $this->getMixId($t->getSeason());
         $sportGroup = $this->seasonService->getSeason($season, false);
         $t->setSeason($sportGroup);
         return $t;
     } catch (\Exception $ex) {
         $this->logError($ex->getMessage());
         throw new Exceptions\DataErrorException($ex->getMessage(), $ex->getCode(), $ex->getPrevious());
     }
 }
コード例 #2
0
ファイル: AdminPresenter.php プロジェクト: fuca/sportsclub
 /**
  * @Secured(resource="updateSeason")
  */
 public function actionUpdateSeason($id)
 {
     if (!is_numeric($id)) {
         $this->handleBadArgument($id);
     }
     try {
         $dbSeason = $this->seasonService->getSeason($id);
         if ($dbSeason !== null) {
             $form = $this->getComponent('updateSeasonForm');
             $form->setDefaults($dbSeason->toArray());
             $this->template->title = $dbSeason->getLabel();
         }
     } catch (Exceptions\DataErrorException $ex) {
         $this->handleDataLoad($id, "default", $ex);
     }
 }