示例#1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $timeToLiveMeasureChoices = StashedDataPackage::getTimeToLiveMeasures();
     $builder->add('passPhrase', 'password', ['mapped' => FALSE, 'label' => "ravel.pass_phrase.label", 'attr' => ['placeholder' => "ravel.pass_phrase.placeholder"]])->add('timeToLiveNumber', 'text', ['data' => '42', 'label' => "ravel.time_to_live_number.label", 'attr' => ['placeholder' => "ravel.time_to_live_number.placeholder"]])->add('timeToLiveMeasure', 'choice', ['choices' => array_combine($timeToLiveMeasureChoices, ["ravel.choice.minutes", "ravel.choice.hours", "ravel.choice.days"]), 'expanded' => TRUE, 'multiple' => FALSE, 'data' => $timeToLiveMeasureChoices[0], 'invalid_message' => "ravel.choice.invalid_message"])->add('data', 'textarea', ['label' => "ravel.data.label", 'attr' => ['placeholder' => "ravel.data.placeholder"]])->add('hashBeta')->add('hashGamma')->add('blankField', 'text');
 }