/** * define form fields. * * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('status', ChoiceType::class, ['label' => 'form.page.type.status.label', 'choices' => ['form.page.type.status.choice.label.draft' => PageStatus::DRAFT, 'form.page.type.status.choice.label.published' => PageStatus::PUBLISHED, 'form.page.type.status.choice.label.unpublished' => PageStatus::UNPUBLISHED, 'form.page.type.status.choice.label.scheduled' => PageStatus::SCHEDULED], 'choices_as_values' => true])->add('publishedAt', null, ['widget' => 'single_text', 'vic_datetimepicker' => true]); }
/** * define form fields * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('slug', null, array('label' => 'form.page.type.slug.label'))->add('status', 'choice', array('label' => 'form.page.type.status.label', 'choices' => array(PageStatus::DRAFT => 'form.page.type.status.choice.label.draft', PageStatus::PUBLISHED => 'form.page.type.status.choice.label.published', PageStatus::UNPUBLISHED => 'form.page.type.status.choice.label.unpublished', PageStatus::SCHEDULED => 'form.page.type.status.choice.label.scheduled')))->add('publishedAt', null, array('widget' => 'single_text', 'vic_datetimepicker' => true)); }