Example #1
0
 /**
  * Créer un nouveau match
  *
  * @param User $user
  * @param Team $team
  * @return FriendlyMatch
  *
  * @author Benjamin Levoir <*****@*****.**>
  */
 public function createMatch(User $user, Team $team)
 {
     $match = new FriendlyMatch();
     $match->setUser($user);
     $match->setHostTeam($team);
     return $match;
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('title', 'text', array('label' => 'lg.friendly_match.fields.title'));
     $builder->add('content', 'textarea', array('label' => 'lg.friendly_match.fields.content'));
     $builder->add('date', 'datetime', array('widget' => 'single_text', 'label' => 'lg.friendly_match.fields.date', 'format' => 'dd-MM-yyyy HH:mm', 'attr' => array('class' => 'datetimepicker')));
     $builder->add('type', 'choice', array('label' => 'lg.friendly_match.fields.type', 'empty_value' => 'lg.core.all', 'choices' => \CoreBundle\Entity\FriendlyMatch::getAvailableTypes()));
     $builder->add('submit', 'submit');
 }
Example #3
0
 /**
  * {@inheritDoc}
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->setMethod('GET');
     $builder->add('teamName', 'text', array('label' => 'lg.friendly_match.fields.teamName'));
     $builder->add('status', 'choice', array('label' => 'lg.friendly_match.fields.status', 'empty_value' => 'lg.core.all', 'choices' => \CoreBundle\Entity\FriendlyMatch::getAvailableStatus()));
     $builder->add('type', 'choice', array('label' => 'lg.friendly_match.fields.type', 'empty_value' => 'lg.core.all', 'choices' => \CoreBundle\Entity\FriendlyMatch::getAvailableTypes()));
     $builder->add('submit', 'submit', array('label' => 'lg.core.search'));
 }