private function copyMatchForm(Match $match)
 {
     $matchForm = new MatchForm();
     $matchForm->setId($match->getId());
     $matchForm->setPid($match->getGroup()->getId());
     $matchForm->setMatchno($match->getMatchno());
     $matchdate = Date::getDateTime($match->getDate(), $match->getTime());
     $dateformat = $this->get('translator')->trans('FORMAT.DATE');
     $matchForm->setDate(date_format($matchdate, $dateformat));
     $timeformat = $this->get('translator')->trans('FORMAT.TIME');
     $matchForm->setTime(date_format($matchdate, $timeformat));
     $matchForm->setPlayground($match->getPlayground());
     /* @var $homeRel QMatchRelation */
     $homeRel = $this->get('match')->getQMatchRelationByMatch($match->getId(), false);
     if ($homeRel != null) {
         $matchForm->setGroupA($homeRel->getGroup()->getId());
         $matchForm->setRankA($homeRel->getRank());
     }
     /* @var $awayRel QMatchRelation */
     $awayRel = $this->get('match')->getQMatchRelationByMatch($match->getId(), true);
     if ($awayRel != null) {
         $matchForm->setGroupB($awayRel->getGroup()->getId());
         $matchForm->setRankB($awayRel->getRank());
     }
     return $matchForm;
 }
 private function copyMatchForm(Match $match)
 {
     $matchForm = new MatchForm();
     $matchForm->setId($match->getId());
     $matchForm->setGroup($match->getGroup());
     $matchForm->setMatchno($match->getMatchno());
     $matchdate = Date::getDateTime($match->getDate(), $match->getTime());
     $dateformat = $this->get('translator')->trans('FORMAT.DATE');
     $matchForm->setDate(date_format($matchdate, $dateformat));
     $timeformat = $this->get('translator')->trans('FORMAT.TIME');
     $matchForm->setTime(date_format($matchdate, $timeformat));
     $matchForm->setPlayground($match->getPlayground());
     $matchForm->setTeamA($this->get('match')->getMatchHomeTeam($match->getId()));
     $matchForm->setTeamB($this->get('match')->getMatchAwayTeam($match->getId()));
     return $matchForm;
 }