src/Form/AnnouncementType.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\FormBuilderInterface;
  4. /**
  5.  *
  6.  * @author wendell.zheng <wxzheng@ustc.edu.cn>
  7.  */
  8. class AnnouncementType extends NameValidType
  9. {
  10.     public function buildForm(FormBuilderInterface $builder, array $options)
  11.     {
  12.         parent::buildForm($builder$options);
  13.         $builder->add('content'null, [
  14.             'label' => '内容'
  15.         ])->add('publishedAt'null, [
  16.             'label' => '发布日期',
  17.             'widget' => 'single_text'
  18.         ]);
  19.     }
  20. }