Example #1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $builder->add('user', 'user', array('label' => 'User ID', 'required' => false));
     $builder->add('ip', 'text', array('label' => 'IP', 'required' => false));
     $builder->add('howLong', 'choice', array('label' => 'On how long', 'choices' => Ban::howLongChoices()));
     $builder->add('reason', 'textarea', array('label' => 'Reason', 'required' => false));
 }
Example #2
0
 /**
  * @Route("", name="moderator_bans")
  */
 public function bans()
 {
     $bans = Ban::findAll();
     return $this->render('moderator/ban/index.twig', array('bans' => $bans, 'howLongChoices' => Ban::howLongChoices()));
 }